With configuration file from GUI

Before you authenticate:

  1. Review cluster access options from the console.
  2. Install the kubectl-shturval-plugin cluster access module. See the module installation instructions.

In the Shturval GUI, you can download a configuration file for the kubectl-shturval-plugin module:

Access to one cluster

When the kubectl-shturval-plugin module is installed, access the cluster from the console as follows:

  1. In the cluster GUI, click the arrow next to your user name and select Download config for shturval-login-plugin. The download of shturval-login-plugin.yaml starts automatically.
Screenshot

configlp configlp1

Example shturval-login-plugin.yaml
auth-url: shturval.clustername.ip-XX-XX-XX-XX.shturval.link
client-id: backend
client-secret: qz86fkqkb
cacert: |
  -----BEGIN CERTIFICATE-----
  MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkG
  A1UEBhMCVVMxFjAUBgNpFQUWw==
  -----END CERTIFICATE-----  
username: username
cluster-name: clustername
kubeConfig: clustername.conf
server-url: shturval.clustername.ip-XX-XX-XX-XX.shturval.link

Please note! The configuration file changes the path to the downloaded cluster kubeconfig. The cluster kubeconfig is saved in the directory where you run the commands, using a filename that matches the cluster name.

  1. Move the configuration file to your home directory (for example, /root on Linux).
Command
mv ENTER-PATH-TO-DOWNLOADED-shturval-login-plugin.yaml USER-HOME-DIRECTORY/shturval-login-plugin.yaml
  1. Run the command to download the cluster kubeconfig. You are prompted for your account password interactively.
Example: load cluster kubeconfig using the downloaded configuration file
kubectl shturval login
  1. Move the cluster kubeconfig to the ~/.kube and rename the file to config.
Command
mv ENTER-PATH-TO-clustername.conf ~/.kube/config

After the cluster kubeconfig is loaded, use kubectl commands to manage the cluster.

If cluster access fails, see Actions for common access errors.

Access to all user-accessible clusters

When the kubectl-shturval-plugin module is installed, access clusters from the console as follows:

  1. On the Shturval platform home page, click the arrow next to your user name and select Download config shturval-login-plugin for all clusters. The download of shturval-login-plugin.yaml starts automatically.
Screenshot

configallclusterlp configallclusterlp1

Example shturval-login-plugin.yaml
auth-url: shturval.clustername.ip-XX-XX-XX-XX.shturval.link
client-id: backend
client-secret: qz86fkqkb
cacert: |
  -----BEGIN CERTIFICATE-----
  MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkG
  A1UEBhMCVVMxFjAUBgNpFQUWw==
  -----END CERTIFICATE-----  
username: username
kubeConfig: all-clusters.conf
server-url: shturval.clustername.ip-XX-XX-XX-XX.shturval.link

Please note! The configuration file changes the path to the downloaded cluster kubeconfigs. Cluster kubeconfigs are saved in the all-clusters.conf file in the directory where you run the commands.

  1. Move the configuration file to your home directory (for example, /root on Linux).
Command
mv ENTER-PATH-TO-DOWNLOADED-shturval-login-plugin.yaml USER-HOME-DIRECTORY/shturval-login-plugin.yaml
  1. Run the command to download cluster kubeconfigs. You are prompted for your account password interactively.
Example: load cluster kubeconfigs using the downloaded configuration file
kubectl shturval login 
  1. Move the kubeconfigs of the clusters to the ~/.kube folder and rename the file to config
Command example
mv ENTER-PATH-TO-all-clusters.conf ~/.kube/config

After the cluster kubeconfigs are loaded, use kubectl commands to manage the available clusters.

If cluster access fails, see Actions for common access errors.