commit 01819d5090bc8da039533dd0ac915b35cc489db1
Author: Andy Ning <email address hidden>
Date: Thu Jun 11 09:19:41 2020 -0400
Run kubeadm command with specific configuration file
Playbook uses the kubeadm command to deploy kubernetes. However,
it is not passing the --kubeconfig parameter to this command, so
the command will search for the kubeconfig file. Normally it finds
this file in /etc/kubernetes/admin.conf, but if a user accidentally
(or intentionally) creates a config file at /root/.kube/config,
this file can take precedence and cause the kubeadm command to fail.
This commit updated the command with /etc/kubernetes/admin.conf as its
configuration file explicitly.
Change-Id: Id97a7c25cd6f0a0b3cc31276dd77c193fcbdefc6
Closes-Bug: 1882678
Signed-off-by: Andy Ning <email address hidden>
Reviewed: https:/ /review. opendev. org/735216 /git.openstack. org/cgit/ starlingx/ ansible- playbooks/ commit/ ?id=01819d5090b c8da039533dd0ac 915b35cc489db1
Committed: https:/
Submitter: Zuul
Branch: master
commit 01819d5090bc8da 039533dd0ac915b 35cc489db1
Author: Andy Ning <email address hidden>
Date: Thu Jun 11 09:19:41 2020 -0400
Run kubeadm command with specific configuration file
Playbook uses the kubeadm command to deploy kubernetes. However, /admin. conf, but if a user accidentally
it is not passing the --kubeconfig parameter to this command, so
the command will search for the kubeconfig file. Normally it finds
this file in /etc/kubernetes
(or intentionally) creates a config file at /root/.kube/config,
this file can take precedence and cause the kubeadm command to fail.
This commit updated the command with /etc/kubernetes /admin. conf as its
configuration file explicitly.
Change-Id: Id97a7c25cd6f0a 0b3cc31276dd77c 193fcbdefc6
Closes-Bug: 1882678
Signed-off-by: Andy Ning <email address hidden>