Skip to content

Commit

Permalink
Become root when creating kubeadm token as part of add-nodes.yaml (vm…
Browse files Browse the repository at this point in the history
…ware-archive#162)

Kubeadm needs access to the kubeconfig file in
/etc/kubernetes/admin.conf. This file can only be used by a user with
elevated privileges.

Signed-off-by: Alexander Brand <alexbrand09@gmail.com>
  • Loading branch information
alexbrand authored and craigtracey committed Apr 30, 2019
1 parent 6ad49e9 commit 2619aac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions swizzle/add-nodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

- name: create a kubeadm token
hosts: primary_master
become: yes
tasks:
- name: generate a kubeadm token
command: "/usr/bin/kubeadm token create --config /etc/kubernetes/kubeadm.conf --kubeconfig /etc/kubernetes/admin.conf"
Expand Down

0 comments on commit 2619aac

Please sign in to comment.