No configuration file and no 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.

  3. After you install the kubectl-shturval-plugin module, run kubectl shturval login, substituting your parameter values, to download kubeconfigs for the clusters available to the user.

Available options for the kubectl shturval login command
ParameterRequiredDescription
--auth-url [string]noAuthentication server URL
--cacert [string]noContents of the root trusted certificate
--cacert-file [string]noPath to the root trusted certificate
--client-id [string]noClient ID for the authentication service. Default: backend
--client-secret [string]yesSecret client for authentication service
-n, --cluster-name [string]noName of the cluster to get kubeconfig. Not specified if you need to get kubeconfigs of all clusters
--config-path [string]noPath to the location of the shturval-login-plugin.yaml configuration file. Default for Linux: /root
-i, --insecurenoTLS connection security check sign
-k, --kubeconfig [string]noPath to downloaded kubeconfigs. Default for Linux: /root/.kube/config
-p, --password [string]noPassword for connecting to the shturval-backend server. If your password contains special characters ($,<, >, *, &, ?, /,\ ), you must escape them using single quotes. For example, --password='my$Password?'.
-s, --server-url [string]yes, if there is no configuration file or the URL is not specified in itshturval-backend server URL
--ttl [string]noToken lifetime. Default 24h
-u, --username [string]yes, if there is no configuration file or the username is not specified in itUsername for connecting to the shturval-backend server
-v, --versionnologin command version
  1. Once the clusters’ kubeconfigs are loaded, you can manage the available clusters using the kubectl utility commands.

Please note! After calling the command without a connection password (parameter -p / --password), it will be requested interactively.

Screenshot of an example password request

logindownload2

Examples of loading cluster kubeconfigs for the user without a configuration file

1. Command to load cluster kubeconfigs with specified account parameters without password, shturval-backend server URL, client secret for authentication service and without TLS connection security check
kubectl shturval login --username=ENTER-USERNAME-FOR-CONNECTION --server-url=ENTER-shturval-backend-SERVER-URL --insecure=true --client-secret=ENTER-AUTHENTICATION-SERVICE-CLIENT-SECRET

In --client-secret enter the value of the backend secret key backend-. It is located in the shturval-backend namespace of the management cluster. If you do not have access to the secret, request the data from the platform administrator.

2. Command to load kubeconfigs of clusters with specified account parameters, shturval-backend server URL, client secret for authentication service and TLS connection security check enabled (root certificate specified)
kubectl shturval login --username=ENTER-USERNAME-FOR-CONNECTION --password='ENTER-USER-PASSWORD' --server-url=ENTER-shturval-backend-SERVER-URL --client-secret=ENTER-AUTHENTICATION-SERVICE-CLIENT-SECRET --cacert=-----BEGIN CERTIFICATE-----Base64 content-----END CERTIFICATE-----

In --client-secret enter the value of the backend secret key backend-. It is located in the shturval-backend namespace of the management cluster. If you do not have access to the secret, request the data from the platform administrator.

3. Command to load cluster kubeconfigs with specified account parameters, shturval-backend server URL, client secret for the authentication service and TLS connection security check enabled (the path to the root trusted certificate is specified)
kubectl shturval login --username=ENTER-USERNAME-FOR-CONNECTION --password='ENTER-USER-PASSWORD' --server-url=ENTER-shturval-backend-SERVER-URL --client-secret=ENTER-AUTHENTICATION-SERVICE-CLIENT-SECRET --cacert-file=ENTER-PATH-TO-ROOT-TRUSTED-CERTIFICATE

In --client-secret enter the value of the backend secret key backend-. It is located in the shturval-backend namespace of the management cluster. If you do not have access to the secret, request the data from the platform administrator.

4. The command to load kubeconfigs of clusters without checking the security of the TLS connection, with the specified directory for loading kubeconfigs of the available clusters
kubectl shturval login --username=ENTER-USERNAME-FOR-CONNECTION --password='ENTER-USER-PASSWORD' --server-url=ENTER-shturval-backend-SERVER-URL --insecure=true --client-secret=ENTER-AUTHENTICATION-SERVICE-CLIENT-SECRET --kubeconfig=ENTER-PATH-FOR-kubeconfig-DOWNLOAD 

In --client-secret enter the value of the backend secret key backend-. It is located in the shturval-backend namespace of the management cluster. If you do not have access to the secret, request the data from the platform administrator.

5. Command to load kubeconfig of one cluster with specified mandatory authentication parameters, a password for connecting to the shturval-backend server, without checking the security of the TLS connection
kubectl shturval login --username=ENTER-USERNAME-FOR-CONNECTION --password='ENTER-USER-PASSWORD' --server-url=ENTER-shturval-backend-SERVER-URL --client-secret=ENTER-AUTHENTICATION-SERVICE-CLIENT-SECRET --cluster-name=myclustername --insecure=true

In --client-secret enter the value of the backend secret key backend-. It is located in the shturval-backend namespace of the management cluster. If you do not have access to the secret, request the data from the platform administrator.

6. Command to load kubeconfig of one cluster with specified required authentication parameters, TLS connection security check
kubectl shturval login --username=ENTER-USERNAME-FOR-CONNECTION --password='ENTER-USER-PASSWORD' --server-url=ENTER-shturval-backend-SERVER-URL --client-secret=ENTER-AUTHENTICATION-SERVICE-CLIENT-SECRET --cluster-name=ENTER-CLUSTER-NAME --cacert-file=ENTER-PATH-TO-ROOT-TRUSTED-CERTIFICATE

In --client-secret enter the value of the backend secret key backend-. It is located in the shturval-backend namespace of the management cluster. If you do not have access to the secret, request the data from the platform administrator.

If you encounter access errors, you can find a way to solve the problem in the next section Actions in case of common access errors.