Created
November 7, 2019 08:33
-
-
Save dholbach/056eec44af1c10312a527b624975539a to your computer and use it in GitHub Desktop.
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
❯ cat ~/go/src/k8s.io/kubeadm/kinder/config.yaml | |
apiVersion: kubeadm.k8s.io/v1beta2 | |
kind: InitConfiguration | |
--- | |
apiVersion: kubeadm.k8s.io/v1beta2 | |
kind: ClusterConfiguration | |
featureGates: | |
AddonInstaller: true | |
--- | |
apiVersion: addons.config.k8s.io/v1alpha1 | |
kind: AddonInstallerConfiguration | |
addons: | |
- github.com/kubernetes-sigs/kustomize//examples/multibases/dev/?ref=v1.0.6 | |
❯ cat ~/go/src/k8s.io/kubeadm/kinder/dev-cluster.sh | |
#!/bin/sh | |
# setup a kinder cluster with the bazel and output directories mounted | |
set -eu | |
binary="kubeadm" | |
kube_root="${kube_root:-${GOPATH:-${HOME}/go}/src/k8s.io/kubernetes}" | |
bazel_binpath="bazel-bin/cmd/${binary}/linux_amd64_pure_stripped/" | |
output_binpath="_output/local/bin/linux/amd64/" | |
kinder_root="${kinder_root:-${GOPATH:-${HOME}/go}/src/k8s.io/kubeadm/kinder}" | |
cat << EOF | kinder create cluster --config=/dev/stdin | |
kind: Cluster | |
apiVersion: kind.sigs.k8s.io/v1alpha3 | |
nodes: | |
- role: control-plane | |
extraMounts: | |
- containerPath: /output-bin | |
hostPath: ${kube_root}/${output_binpath} | |
- containerPath: /bazel-${binary} | |
hostPath: ${kube_root}/${bazel_binpath} | |
- containerPath: /kinder | |
hostPath: ${kinder_root} | |
EOF | |
docker exec -it kind-control-plane \ | |
sh -c 'apt-get update && apt-get install -y git' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment