Last active
April 2, 2020 09:50
-
-
Save alexeldeib/e45f58514ecf2c97a2b7a060b22aa501 to your computer and use it in GitHub Desktop.
Example Cluster API AKS deployment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Azure settings. | |
export AZURE_LOCATION="southcentralus" | |
export AZURE_RESOURCE_GROUP="ace-test" | |
export AZURE_TENANT_ID="" | |
export AZURE_CLIENT_ID="" | |
export AZURE_CLIENT_SECRET="" | |
export AZURE_SUBSCRIPTION_ID="" | |
export SSH_PUBLIC_KEY="$(cat /home/ace/.ssh/id_rsa.pub)" | |
# Cluster settings. | |
export CLUSTER_NAME="capz-cluster" | |
export KUBERNETES_VERSION="1.17.3" | |
# Machine settings. | |
export CONTROL_PLANE_MACHINE_TYPE="Standard_D4s_v3" | |
export AZURE_NODE_MACHINE_TYPE="Standard_D4s_v3" | |
export WORKER_MACHINE_COUNT=2 | |
# Dev settings | |
export REGISTRY="docker.io/alexeldeib" | |
export MANAGER_IMAGE_TAG="dev" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: cluster.x-k8s.io/v1alpha3 | |
kind: Cluster | |
metadata: | |
name: ${CLUSTER_NAME} | |
spec: | |
clusterNetwork: | |
pods: | |
cidrBlocks: ["192.168.0.0/16"] | |
infrastructureRef: | |
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 | |
kind: AzureManagedCluster | |
name: ${CLUSTER_NAME} | |
controlPlaneRef: | |
kind: KubeadmControlPlane | |
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 | |
name: "${CLUSTER_NAME}-control-plane" | |
--- | |
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 | |
kind: AzureManagedCluster | |
metadata: | |
name: ${CLUSTER_NAME} | |
spec: | |
resourceGroup: "${AZURE_RESOURCE_GROUP}" | |
location: "${AZURE_LOCATION}" | |
defaultPoolRef: | |
name: "defaultpool" | |
sshPublicKey: "${SSH_PUBLIC_KEY}" | |
version: "${KUBERNETES_VERSION}" | |
--- | |
apiVersion: exp.cluster.x-k8s.io/v1alpha3 | |
kind: MachinePool | |
metadata: | |
name: "defaultpool" | |
spec: | |
clusterName: "${CLUSTER_NAME}" | |
replicas: "${WORKER_MACHINE_COUNT}" | |
template: | |
metadata: {} | |
spec: | |
bootstrap: | |
dataSecretName: "" | |
clusterName: "${CLUSTER_NAME}" | |
infrastructureRef: | |
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 | |
kind: AzureManagedMachinePool | |
name: "defaultpool" | |
namespace: default | |
version: "${KUBERNETES_VERSION}" | |
--- | |
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 | |
kind: AzureManagedMachinePool | |
metadata: | |
name: "defaultpool" | |
spec: | |
osDiskSizeGB: 512 | |
sku: "${AZURE_NODE_MACHINE_TYPE}" | |
--- | |
apiVersion: exp.cluster.x-k8s.io/v1alpha3 | |
kind: MachinePool | |
metadata: | |
name: "agentpool2" | |
spec: | |
clusterName: "${CLUSTER_NAME}" | |
replicas: "${WORKER_MACHINE_COUNT}" | |
template: | |
metadata: {} | |
spec: | |
bootstrap: | |
dataSecretName: "" | |
clusterName: "${CLUSTER_NAME}" | |
infrastructureRef: | |
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 | |
kind: AzureManagedMachinePool | |
name: "agentpool2" | |
namespace: default | |
version: "${KUBERNETES_VERSION}" | |
--- | |
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 | |
kind: AzureManagedMachinePool | |
metadata: | |
name: "agentpool2 " | |
spec: | |
osDiskSizeGB: 1024 | |
sku: "${AZURE_NODE_MACHINE_TYPE}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment