Download Kubeconfig
A kubeconfig file is used to configure access to Kubernetes. You can download the kubeconfig file using the following methods:
Use configuration management tools
You can download the kubeconfig file using configuration management tools such as IonosCTL CLI, Ansible, and Terraform. Following are a few options to retrieve the kubeconfig files.
Tool
Parameter Reference
Description
K8s Cluster Id
You can retrieve the kubeconfig file and save it using a single command from IonosCTL CLI. For more information, see example.
ionosctl k8s kubeconfig get --cluster-id CLUSTER_ID
k8s_cluster config_file
You can retrieve the kubeconfig by specifying the kubeconfig parameter in the Ansible YAML file.
For more information, see Kubernetes configuration.
filename
You can interact with the kubeconfig resources by providing proper configurations.
For more information, see Example of dumping the kubeconfig raw data into a yaml file.
Use Managed Kubernetes in the DCD
In the DCD, go to Menu > Containers > Managed Kubernetes.
Navigate to the OPTIONS column of the cluster from the cluster list and select either Download kubeconfig.yaml or Download kubeconfig.json to download the
kubeconfigfile.

You can also select a cluster by clicking on its name, selecting the Cluster settings tab, and choosing either kubeconfig.yaml or kubeconfig.json from the drop-down list to download the
kubeconfigfile.

Optionally, select the Kubernetes element in the Workspace and download the
kubeconfigfile from the Inspector pane.

You can download the kubeconfig file:
Using configuration management tools
You can download the kubeconfig file using configuration management tools such as IonosCTL CLI, Ansible, and Terraform. Following are a few options to retrieve the kubeconfig files.
Tool
Parameter Reference
Description
K8s Cluster Id
You can retrieve the kubeconfig file and save it using a single command from IonosCTL CLI. For more information, see example.
ionosctl k8s kubeconfig get --cluster-id CLUSTER_ID
k8s_cluster config_file
You can retrieve the kubeconfig by specifying the kubeconfig parameter in the Ansible YAML file.
For more information, see Kubernetes configuration.
filename
You can interact with the kubeconfig resources by providing proper configurations.
For more information, see Example of dumping the kubeconfig raw data into a yaml file.
Using Kubernetes Manager
To download the kubeconfig file using Kubernetes Manager, follow these steps:
In the DCD, go to Menu > Containers > Managed Kubernetes.
In Kubernetes Manager, select a cluster from the cluster list.
In the Cluster Settings tab, select either kubeconfig.yaml or kubeconfig.json from the drop-down list to download the
kubeconfigfile.

Alternatively, you can also select the Kubernetes element in the Workspace and download the
kubeconfigfile in the Inspector pane.

Last updated
Was this helpful?