Télécharger le fichier kubeconfig
Vous pouvez télécharger le fichier kubeconfig d’un cluster.
Télécharger le fichier kubeconfig avec Cockpit
-
Dans le dashboard Projets, cliquez sur le nom du projet pour lequel vous voulez télécharger le fichier kubeconfig d’un cluster.
Le volet de détails du projet apparaît. -
Cliquez sur l’onglet Clusters.
La liste de vos clusters créés dans le projet apparaît. -
Placez le curseur de la souris sur le rang du cluster pour lequel vous voulez télécharger le fichier kubeconfig et cliquez sur le menu
d’actions.
Un menu déroulant apparaît. -
Cliquez sur
Télécharger kubeconfig.
La boîte de dialogue TÉLÉCHARGER KUBECONFIG apparaît. -
Dans le champ Durée de validité du kubeconfig, spécifiez la durée de vie (TTL) souhaitée pour le certificat.
-
(optionnel) Dans le champ Utilisateur, tapez le nom de l’utilisateur.
-
(optionnel) Dans le champ Groupe, tapez le nom du groupe.
-
Cliquez sur Télécharger.
Le fichier kubeconfig est téléchargé.Votre fichier contient des informations sensibles. Conservez-le dans un répertoire sécurisé.
Télécharger le fichier kubeconfig avec octl
|
À ce jour, cette section est disponible en anglais uniquement. |
The GetKubeconfig command gets the kubeconfig file for a specific cluster. You can specify query parameters for the kubeconfig file.
$ octl kube api GetKubeconfig <cluster_id> --profile "default" \
--User "string" \
--Group "string" \
--Ttl "string"
This command contains the following options that you need to specify:
-
Group: (optional) The group of the kubeconfig file. -
Ttl: (optional) The time to live (TTL) of the kubeconfig file. -
User: (optional) The user of the kubeconfig file.
The GetKubeconfig command returns the following elements:
-
ResponseContext: Information about the context of the response.-
RequestId: The ID of the API request.
-
-
Cluster: The kubeconfig details associated with the cluster.-
request_id: The ID of the API request. -
data: The kubeconfig data for the cluster.-
kubeconfig: The content of the kubeconfig file used to configure access to the cluster.
-
-
{
"ResponseContext": {
"RequestId": "string"
},
"Cluster": {
"request_id": "string",
"data": {
"kubeconfig": "string"
}
}
}