-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update workload cluster with multi-region support (#52)
Add a section that documents how to use the new `cluster-template-alternative-region.yaml` template to show users how to launch clusters in multiple regions.
- Loading branch information
Showing
3 changed files
with
201 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Cluster | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/cluster-name: "${CLUSTER_NAME}" | ||
name: "${CLUSTER_NAME}" | ||
namespace: "${NAMESPACE}" | ||
spec: | ||
clusterNetwork: | ||
pods: | ||
cidrBlocks: | ||
- ${POD_CIDR:="192.168.0.0/16"} | ||
serviceDomain: ${SERVICE_DOMAIN:="cluster.local"} | ||
services: | ||
cidrBlocks: | ||
- ${SERVICE_CIDR:="10.128.0.0/12"} | ||
infrastructureRef: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: OCICluster | ||
name: "${CLUSTER_NAME}" | ||
namespace: "${NAMESPACE}" | ||
controlPlaneRef: | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmControlPlane | ||
name: "${CLUSTER_NAME}-control-plane" | ||
namespace: "${NAMESPACE}" | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: OCICluster | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/cluster-name: "${CLUSTER_NAME}" | ||
name: "${CLUSTER_NAME}" | ||
spec: | ||
compartmentId: "${OCI_COMPARTMENT_ID}" | ||
region: "${OCI_WORKLOAD_REGION}" | ||
--- | ||
kind: KubeadmControlPlane | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
metadata: | ||
name: "${CLUSTER_NAME}-control-plane" | ||
namespace: "${NAMESPACE}" | ||
spec: | ||
version: "${KUBERNETES_VERSION}" | ||
replicas: ${CONTROL_PLANE_MACHINE_COUNT} | ||
machineTemplate: | ||
infrastructureRef: | ||
kind: OCIMachineTemplate | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
name: "${CLUSTER_NAME}-control-plane" | ||
namespace: "${NAMESPACE}" | ||
kubeadmConfigSpec: | ||
clusterConfiguration: | ||
kubernetesVersion: ${KUBERNETES_VERSION} | ||
apiServer: | ||
certSANs: [localhost, 127.0.0.1] | ||
dns: {} | ||
etcd: {} | ||
networking: {} | ||
scheduler: {} | ||
initConfiguration: | ||
nodeRegistration: | ||
criSocket: /var/run/containerd/containerd.sock | ||
kubeletExtraArgs: | ||
cloud-provider: external | ||
provider-id: oci://{{ ds["id"] }} | ||
joinConfiguration: | ||
discovery: {} | ||
nodeRegistration: | ||
criSocket: /var/run/containerd/containerd.sock | ||
kubeletExtraArgs: | ||
cloud-provider: external | ||
provider-id: oci://{{ ds["id"] }} | ||
--- | ||
kind: OCIMachineTemplate | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
metadata: | ||
name: "${CLUSTER_NAME}-control-plane" | ||
spec: | ||
template: | ||
spec: | ||
imageId: "${OCI_IMAGE_ID}" | ||
compartmentId: "${OCI_COMPARTMENT_ID}" | ||
shape: "${OCI_CONTROL_PLANE_MACHINE_TYPE=VM.Standard.E4.Flex}" | ||
shapeConfig: | ||
ocpus: "${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS=1}" | ||
metadata: | ||
ssh_authorized_keys: "${OCI_SSH_KEY}" | ||
isPvEncryptionInTransitEnabled: ${OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION=true} | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: OCIMachineTemplate | ||
metadata: | ||
name: "${CLUSTER_NAME}-md-0" | ||
spec: | ||
template: | ||
spec: | ||
imageId: "${OCI_IMAGE_ID}" | ||
compartmentId: "${OCI_COMPARTMENT_ID}" | ||
shape: "${OCI_NODE_MACHINE_TYPE=VM.Standard.E4.Flex}" | ||
shapeConfig: | ||
ocpus: "${OCI_NODE_MACHINE_TYPE_OCPUS=1}" | ||
metadata: | ||
ssh_authorized_keys: "${OCI_SSH_KEY}" | ||
isPvEncryptionInTransitEnabled: ${OCI_NODE_PV_TRANSIT_ENCRYPTION=true} | ||
--- | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4 | ||
kind: KubeadmConfigTemplate | ||
metadata: | ||
name: "${CLUSTER_NAME}-md-0" | ||
spec: | ||
template: | ||
spec: | ||
joinConfiguration: | ||
nodeRegistration: | ||
kubeletExtraArgs: | ||
cloud-provider: external | ||
provider-id: oci://{{ ds["id"] }} | ||
--- | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: MachineDeployment | ||
metadata: | ||
name: "${CLUSTER_NAME}-md-0" | ||
spec: | ||
clusterName: "${CLUSTER_NAME}" | ||
replicas: ${NODE_MACHINE_COUNT} | ||
selector: | ||
matchLabels: | ||
template: | ||
spec: | ||
clusterName: "${CLUSTER_NAME}" | ||
version: "${KUBERNETES_VERSION}" | ||
bootstrap: | ||
configRef: | ||
name: "${CLUSTER_NAME}-md-0" | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
infrastructureRef: | ||
name: "${CLUSTER_NAME}-md-0" | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: OCIMachineTemplate |