Skip to content

Instantly share code, notes, and snippets.

@surajssd
Last active July 4, 2019 08:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save surajssd/aecac71bc27b7726883066c63226c37d to your computer and use it in GitHub Desktop.
Save surajssd/aecac71bc27b7726883066c63226c37d to your computer and use it in GitHub Desktop.
Kind configs

Using Kind

Multinode PSP enabled

kind create cluster --name multi-node-psp --config psp-multi-cluster.yaml
export KUBECONFIG="$(kind get kubeconfig-path --name="multi-node-psp")"
kubectl apply -f https://raw.githubusercontent.com/kinvolk/terraform-render-bootkube/kinvolk-master/resources/manifests/psp-privileged.yaml
kubectl apply -f https://raw.githubusercontent.com/kinvolk/terraform-render-bootkube/kinvolk-master/resources/manifests/psp-restricted.yaml

Multinode

kind create cluster --name multi-node --config multi-cluster.yaml
export KUBECONFIG="$(kind get kubeconfig-path --name="multi-node")"
# a cluster with 3 control-plane nodes and 3 workers
kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha3
nodes:
- role: control-plane
- role: control-plane
- role: control-plane
- role: worker
- role: worker
- role: worker
# a cluster with 3 control-plane nodes and 3 workers and psp enabled
kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha3
nodes:
- role: control-plane
- role: control-plane
- role: control-plane
- role: worker
- role: worker
- role: worker
kubeadmConfigPatches:
- |
apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
metadata:
name: config
apiServer:
extraArgs:
enable-admission-plugins: PodSecurityPolicy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment