Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save adrian-pino/e7cf17e9ab4e2127bf03f8c9b9d939fd to your computer and use it in GitHub Desktop.

Select an option

Save adrian-pino/e7cf17e9ab4e2127bf03f8c9b9d939fd to your computer and use it in GitHub Desktop.
Kind installation for a cluster that is reachable from outside of the node

Kind installation for a cluster reachable from outside of the node

# Variables definition
CLUSTER_NAME = cilium-kind
CONTROL_PLANE_IP= X.Y.Z.T

kind create cluster --name $CLUSTER_NAME --config - <<EOF
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
  - role: control-plane
    kubeadmConfigPatches:
    - |
      kind: ClusterConfiguration
      apiServer:
        certSANs:
        - "$CONTROL_PLANE_IP"
    extraPortMappings:
    - containerPort: 6443
      hostPort: 6443
      listenAddress: "$CONTROL_PLANE_IP"
  - role: worker
  - role: worker
containerdConfigPatches:
- |-
  [plugins."io.containerd.grpc.v1.cri".containerd]
    discard_unpacked_layers = false
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment