End User - Configure Kubernetes Remote CLIΒΆ
Configure the kubernetes remote CLI on your Linux-based system to enable access to the StarlingX system kubernetes remote CLI commands.
This procedure should be performed on your Linux-based system.
Prerequisites
You need to have a Linux-based system with python installed.
You need to have the
stx-remote-access.tar
file from your system administrator, containing system information related to your StarlingX system.
Procedure
Install the
kubectl
client CLI on the host.Follow the instructions on Install and Set Up kubectl on Linux <https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/>.
The example below can be used for Ubuntu.
$ sudo curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" $ sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
Download the
oidc-auth
shell script from StarlingX site and install python mechanize.$ wget`https://mirror.starlingx.cengn.ca/mirror/starlingx/master/debian/monolithic/latest_build/outputs/remote-cli/ <https://mirror.starlingx.cengn.ca/mirror/starlingx/master/debian/monolithic/latest_build/outputs/remote-cli/stx-remote-cli-1.0.tgz>`__\ oidc-auth $ chmod a+rx oidc-auth $ sudo apt install python3-pip $ sudo pip install mechanize
Extract the StarlingX system information from the
stx-remote-access-info.tar
file from your StarlingX system administrator.# Files from your StarlingX System Administrator $ ls ~/stx-remote-access-info.tar $ tar xvf ~/stx-remote-access-info.tar
Update the
KUBECONFIG
file.$ mkdir ~/.kube $ cp ~/stx-remote-access-info/kubeconfig ~/.kube/config $ vi ~/.kube/config // and change YOURUSERNAMEHERE to your StarlingX LDAP Username, everywhere in file # Add ~/stx-remote-access-info/stx.ca.crt to the list of Trusted CA # e.g. commands shown for ubuntu below $ sudo cp ~/stx-remote-access-info/stx.ca.crt /usr/local/share/ca-certificates $ sudo update-ca-certificates # Authenticate with OIDC/LDAP on StarlingX ... and token will be put in ~/.kube/config $ ./oidc-auth -u <StarlingX-LDAP-Username> -c <OAM-FLOATING-IP>
Postrequisites
Access the kubernetes remote CLI.