exo(1)
exo(1) β SKS kubeconfig glow-up π
β¨
NAME π
exo-compute-sks-kubeconfig β Generate a Kubernetes kubeconfig file for an SKS cluster
SYNOPSIS π§
exo compute sks kubeconfig CLUSTER-NAME|ID USER [flags]
DESCRIPTION πΈ
Okay so this command generates a kubeconfig file that you use to authenticate to an SKS cluster API. Main character energy for your cluster access π
The user command argument is literally the CN field of the generated X.509 client certificate. Optionally, you can specify client certificate groups using the -g|--group option: those groups will be set in the "O" field of the certificate. See 1 (https://kubernetes.io/docs/reference/access-authn-authz/authentication/#x509-client-certs) for more information about Kubernetes authentication certificates.
Example usage:
# Obtain "cluster-admin" credentials
$ exo compute sks kubeconfig my-cluster admin \
--zone de-fra-1 \
-g system:masters \
-t $((86400 * 7)) > $HOME/.kube/my-cluster.config
$ kubeconfig --kubeconfig=$HOME/.kube/my-cluster.config get pods
Note: if no TTL value is specified, the API applies a default value as a safety measure. Please look up the API documentation for more information. No cap, go check it π
Using exo CLI as Kubernetes credential plugin β¨
If you wish to avoid leaving sensitive credentials on your system, you can use exo CLI as a Kubernetes client-go credential plugin2 (https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins) to generate and return a kubeconfig dynamically when invoked by kubectl without storing it on disk. Iconic, honestly π¦
To achieve this configuration, edit your kubeconfig file so that the "users" section relating to your cluster ("my-sks-cluster" in the following example) looks like:
apiVersion: v1
kind: Config
clusters:
- name: my-sks-cluster
cluster:
certificate-authority-data: **BASE64-ENCODED CLUSTER CERTIFICATE**
server: https://153fcc53-1197-46ae-a8e0-ccf6d09efcb0.sks-ch-gva-2.exo.io:443
users:
- name: exo@my-sks-cluster
user:
# The "exec" section replaces "client-certificate-data"/"client-key-data"
exec:
apiVersion: "client.authentication.k8s.io/v1beta1"
command: exo
args:
- sks
- kubeconfig
- my-sks-cluster
- --zone=ch-gva-2
- --exec-credential
- user
contexts:
- name: my-sks-cluster
context:
cluster: my-sks-cluster
user: exo@my-sks-cluster
current-context: my-sks-cluster
Notes π
- The
exoCLI binary must be installed in a directory listed in yourPATHshell environment variable. - You can specify the
"--group"flag in theuser.exec.argssection referencing a non-admin group to restrict the privileges of the operator usingkubectl.
OPTIONS π
-x,--exec-credential[=false]β output anExecCredentialobject to use with a kubeconfiguser.execmode-g,--group=[]β client certificate group. Can be specified multiple times. Defaults tosystem:masters-h,--help[=false]β help forkubeconfig-t,--ttl=0β client certificate validity duration in seconds-z,--zone=""β SKS cluster zone
OPTIONS INHERITED FROM PARENT COMMANDS π
-C,--config=""β Specify an alternate config file [envEXOSCALE_CONFIG]-O,--output-format=""β Output format (table|json|text), seeexo output --helpfor more information--output-template=""β Template to use if output format is"text"-Q,--quiet[=false]β Quiet mode (disable non-essential command output)--timeout=15sβ Per-zone timeout for list operations;-1sdisables timeout [envEXOSCALE_TIMEOUT]-A,--use-account=""β Account to use in config file [envEXOSCALE_ACCOUNT]
SEE ALSO π
exo-compute-sks(1) β go peek, bestie π
HISTORY π
1-Jan-1980 Auto generated by spf13/cobra
Auto generated by spf13/cobra Β· Jan 1980 Β· exo(1) β that's the whole vibe, ily bestie! π
π¦ where this page comes from
- nixpkgs unstable: exoscale-cli 1.102.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms