Skip to content

Instantly share code, notes, and snippets.

@jsturtevant
Last active May 24, 2020 15:40
Show Gist options
  • Save jsturtevant/e7601212a0c57271a5247b4cc2a14f96 to your computer and use it in GitHub Desktop.
Save jsturtevant/e7601212a0c57271a5247b4cc2a14f96 to your computer and use it in GitHub Desktop.
ipv6-kubeproxy.yaml
apiVersion: cluster.x-k8s.io/v1alpha3
kind: Cluster
metadata:
name: ${CLUSTER_NAME}
namespace: default
spec:
clusterNetwork:
pods:
cidrBlocks:
- 2001:1234:5678:9abd::/64
controlPlaneRef:
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
kind: KubeadmControlPlane
name: ${CLUSTER_NAME}-control-plane
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: AzureCluster
name: ${CLUSTER_NAME}
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: AzureCluster
metadata:
name: ${CLUSTER_NAME}
namespace: default
spec:
location: ${AZURE_LOCATION}
networkSpec:
vnet:
iPv6Enabled: true
name: ${AZURE_VNET_NAME}
resourceGroup: ${AZURE_RESOURCE_GROUP}
subscriptionID: ${AZURE_SUBSCRIPTION_ID}
---
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
kind: KubeadmControlPlane
metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
extraArgs:
bind-address: '::'
cloud-config: /etc/kubernetes/azure.json
cloud-provider: azure
extraVolumes:
- hostPath: /etc/kubernetes/azure.json
mountPath: /etc/kubernetes/azure.json
name: cloud-config
readOnly: true
timeoutForControlPlane: 20m
controllerManager:
extraArgs:
allocate-node-cidrs: "false"
bind-address: '::'
cloud-config: /etc/kubernetes/azure.json
cloud-provider: azure
extraVolumes:
- hostPath: /etc/kubernetes/azure.json
mountPath: /etc/kubernetes/azure.json
name: cloud-config
readOnly: true
scheduler:
extraArgs:
bind-address: '::'
files:
- content: |
{
"cloud": "AzurePublicCloud",
"tenantId": "${AZURE_TENANT_ID}",
"subscriptionId": "${AZURE_SUBSCRIPTION_ID}",
"aadClientId": "${AZURE_CLIENT_ID}",
"aadClientSecret": "${AZURE_CLIENT_SECRET}",
"resourceGroup": "${AZURE_RESOURCE_GROUP}",
"securityGroupName": "${CLUSTER_NAME}-node-nsg",
"location": "${AZURE_LOCATION}",
"vmType": "standard",
"vnetName": "${CLUSTER_NAME}-vnet",
"vnetResourceGroup": "${CLUSTER_NAME}",
"subnetName": "${CLUSTER_NAME}-node-subnet",
"routeTableName": "${CLUSTER_NAME}-node-routetable",
"userAssignedID": "${CLUSTER_NAME}",
"loadBalancerSku": "standard",
"maximumLoadBalancerRuleCount": 250,
"useManagedIdentityExtension": false,
"useInstanceMetadata": true
}
owner: root:root
path: /etc/kubernetes/azure.json
permissions: "0644"
initConfiguration:
nodeRegistration:
kubeletExtraArgs:
cloud-config: /etc/kubernetes/azure.json
cloud-provider: azure
node-ip: '::'
name: '{{ ds.meta_data["local_hostname"] }}'
joinConfiguration:
nodeRegistration:
kubeletExtraArgs:
cloud-config: /etc/kubernetes/azure.json
cloud-provider: azure
node-ip: '::'
name: '{{ ds.meta_data["local_hostname"] }}'
kubeProxyConfiguration:
bindAddress: '::'
healthz-bind-address: '::'
metrics-bind-address: '::'
mode: iptables
useExperimentalRetryJoin: true
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: AzureMachineTemplate
metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
template:
spec:
location: ${AZURE_LOCATION}
osDisk:
diskSizeGB: 128
managedDisk:
storageAccountType: Premium_LRS
osType: Linux
sshPublicKey: ${AZURE_SSH_PUBLIC_KEY}
vmSize: ${AZURE_CONTROL_PLANE_MACHINE_TYPE}
---
apiVersion: cluster.x-k8s.io/v1alpha3
kind: MachineDeployment
metadata:
name: ${CLUSTER_NAME}-md-0
namespace: default
spec:
clusterName: ${CLUSTER_NAME}
replicas: ${WORKER_MACHINE_COUNT}
selector:
matchLabels: null
template:
spec:
bootstrap:
configRef:
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3
kind: KubeadmConfigTemplate
name: ${CLUSTER_NAME}-md-0
clusterName: ${CLUSTER_NAME}
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-md-0
version: ${KUBERNETES_VERSION}
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: AzureMachineTemplate
metadata:
name: ${CLUSTER_NAME}-md-0
namespace: default
spec:
template:
spec:
location: ${AZURE_LOCATION}
osDisk:
diskSizeGB: 30
managedDisk:
storageAccountType: Premium_LRS
osType: Linux
sshPublicKey: ${AZURE_SSH_PUBLIC_KEY}
vmSize: ${AZURE_NODE_MACHINE_TYPE}
---
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3
kind: KubeadmConfigTemplate
metadata:
name: ${CLUSTER_NAME}-md-0
namespace: default
spec:
template:
spec:
clusterConfiguration:
apiServer:
extraArgs:
bind-address: '::'
controllerManager:
extraArgs:
bind-address: '::'
scheduler:
extraArgs:
bind-address: '::'
files:
- content: |
{
"cloud": "AzurePublicCloud",
"tenantId": "${AZURE_TENANT_ID}",
"subscriptionId": "${AZURE_SUBSCRIPTION_ID}",
"aadClientId": "${AZURE_CLIENT_ID}",
"aadClientSecret": "${AZURE_CLIENT_SECRET}",
"resourceGroup": "${CLUSTER_NAME}",
"securityGroupName": "${CLUSTER_NAME}-node-nsg",
"location": "${AZURE_LOCATION}",
"vmType": "standard",
"vnetName": "${CLUSTER_NAME}-vnet",
"vnetResourceGroup": "${CLUSTER_NAME}",
"subnetName": "${CLUSTER_NAME}-node-subnet",
"routeTableName": "${CLUSTER_NAME}-node-routetable",
"loadBalancerSku": "standard",
"maximumLoadBalancerRuleCount": 250,
"useManagedIdentityExtension": false,
"useInstanceMetadata": true
}
owner: root:root
path: /etc/kubernetes/azure.json
permissions: "0644"
joinConfiguration:
nodeRegistration:
kubeletExtraArgs:
cloud-config: /etc/kubernetes/azure.json
cloud-provider: azure
node-ip: '::'
name: '{{ ds.meta_data["local_hostname"] }}'
kubeProxyConfiguration:
bindAddress: '::'
healthz-bind-address: '::'
metrics-bind-address: '::'
mode: iptables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment