Comment 0 for bug 1882678

Revision history for this message
Bart Wensley (bartwensley) wrote :

Brief Description
-----------------
Our software uses the kubeadm command to install, manage and upgrade 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.

Severity
--------
Major: the user should not be creating these extra files, but if they do, basic system functionality (e.g. locking/unlocking hosts) is broken.

Steps to Reproduce
------------------
Create an invalid kubeconfig file at /root/.kube/config. This can be done as the sysadmin user by running "sudo kubectl config set-context ..." and "sudo kubectl config use-context ..." commands.

Expected Behavior
------------------
The system should always use the /etc/kubernetes/admin.conf file for kubeadm commands.

Actual Behavior
----------------
See above

Reproducibility
---------------
Reproducible

System Configuration
--------------------
All

Branch/Pull Time/Commit
-----------------------
StarlingX Master - this is a day one issue.

Last Pass
---------
Never

Timestamp/Logs
--------------
N/A

Test Activity
-------------
Evaluation

Workaround
----------
Delete the extra kubeconfig file.