Skip to content

Commit

Permalink
add bootstrap token to betav1
Browse files Browse the repository at this point in the history
  • Loading branch information
BenTheElder committed Jan 8, 2019
1 parent 91c7a92 commit 1371151
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/cluster/kubeadm/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const ConfigTemplateBetaV1 = `# config generated by kind
apiVersion: kubeadm.k8s.io/v1beta1
kind: ClusterConfiguration
kubernetesVersion: {{.KubernetesVersion}}
clusterName: {{.ClusterName}}
clusterName: "{{.ClusterName}}"
# on docker for mac we have to expose the api server via port forward,
# so we need to ensure the cert is valid for localhost so we can talk
# to the cluster after rewriting the kubeconfig to point to localhost
Expand All @@ -143,7 +143,11 @@ apiServer:
---
apiVersion: kubeadm.k8s.io/v1beta1
kind: InitConfiguration
# we use a random local port for the API server
# we use a well know token for TLS bootstrap
bootstrapTokens:
- token: "{{ .Token }}"
# we use a well know port for making the API server discoverable inside docker network.
# from the host machine such port will be accessible via a random local port instead.
localAPIEndpoint:
bindPort: {{.APIBindPort}}
---
Expand Down

0 comments on commit 1371151

Please sign in to comment.