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.
Brief Description /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.
-----------------
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
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 /admin. conf file for kubeadm commands.
------------------
The system should always use the /etc/kubernetes
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.