Skip to content

Instantly share code, notes, and snippets.

@rgolangh
Last active February 15, 2024 18:43
Show Gist options
  • Save rgolangh/74136541c267b50016ad53f8a5e7cb52 to your computer and use it in GitHub Desktop.
Save rgolangh/74136541c267b50016ad53f8a5e7cb52 to your computer and use it in GitHub Desktop.
#/bin/bash
#
set -xe
kind delete cluster orchestrator
KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER=native kind create cluster --config - <<EOF
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: orchestrator
networking:
apiServerAddress: "127.0.0.1"
apiServerPort: 16443
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 9090
protocol: TCP
- containerPort: 443
hostPort: 9443
protocol: TCP
- role: worker
EOF
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
kubectl wait --namespace ingress-nginx \
--for=condition=ready pod \
--selector=app.kubernetes.io/component=controller \
--timeout=90s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment