In IBM Cloud Private EE, I need to go to the Web UI User > Configure client
, copy the kubectl
config commands and then run these 5 commands on my client machine.
I deployed the IBM Cloud private EE on 5 VMs and have access to the master node. I am wondering if there is a way to capture these kubectl config
commands directly from the docker containers without having a need to go to the Web UI.
For example: I did not want to download the kubectl
client from google (as I just want to use same kubectl
version which is in the ICP containers) and I used the following command to get it from the container itself.
docker run --rm -v $(pwd):/data -e LICENSE=accept \
ibmcom/icp-inception:2.1.0.1-ee \
cp -r /usr/local/bin/kubectl /data
Then, I copied this to all VM guests so that I could access kubectl
from any guest.
chmod +x kubectl
for host in $(awk '/192.168.142/ {print $3}' /etc/hosts)
do
scp kubectl $host:/bin
done
Where - 192.168.142
is the subnet of my VM guests.
But, I could not figure out how to get Configure Client
commands without having to go to the Web UI. I need this to automate client kubectl
command so that my environment is ready for kubectl
commands through simple scripts.