Utilisez le chemin d'accès kubeconfig du cluster Kubernetes pour remplacer CLUSTER_KUBECONFIG dans ces instructions.
Pour obtenir les autorisations requises pour supprimer des charges de travail sans état, demandez à votre administrateur IAM de l'organisation de vous accorder le rôle d'administrateur de l'espace de noms (namespace-admin) dans l'espace de noms de votre projet.
Supprimer un déploiement
Pour supprimer un objet Deployment, exécutez la commande suivante :
CLUSTER_KUBECONFIG : fichier kubeconfig pour le cluster Kubernetes.
NAMESPACE : espace de noms du projet de la charge de travail du conteneur.
DEPLOYMENT_NAME : nom du déploiement à supprimer.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eThis guide explains how to delete stateless workloads in a user cluster using standard Kubernetes deletion methods.\u003c/p\u003e\n"],["\u003cp\u003eYou must have the user cluster name and its kubeconfig file to perform the deletion operations.\u003c/p\u003e\n"],["\u003cp\u003eYou will need Namespace Admin permissions granted by your Organization IAM Admin to delete stateless workloads.\u003c/p\u003e\n"],["\u003cp\u003eTo delete a specific Deployment, you will use the \u003ccode\u003ekubectl delete deployment\u003c/code\u003e command, providing your cluster's kubeconfig and the deployment name.\u003c/p\u003e\n"]]],[],null,["# Delete stateless workloads\n\nDelete your stateless workloads using standard Kubernetes deletion\nmethodologies.\n\nBefore you begin\n----------------\n\nTo run commands against the pre-configured bare metal Kubernetes cluster, make sure you have the\nfollowing resources:\n\n1. Locate the Kubernetes cluster name, or ask your Platform\n Administrator what the cluster name is.\n\n2. [Sign in and generate](/distributed-cloud/hosted/docs/latest/appliance/application/ao-user/iam/sign-in#kubernetes-cluster-kubeconfig) the\n kubeconfig file for the Kubernetes cluster if you don't have one.\n\n3. Use the kubeconfig path of the Kubernetes cluster to replace\n \u003cvar translate=\"no\"\u003eCLUSTER_KUBECONFIG\u003c/var\u003e in these instructions.\n\nTo get the required permissions to delete stateless workloads, ask your\nOrganization IAM Admin to grant you the Namespace Admin role (`namespace-admin`)\nin your project namespace.\n\nDelete a deployment\n-------------------\n\nTo delete a `Deployment` object, run: \n\n kubectl --kubeconfig \u003cvar translate=\"no\"\u003eCLUSTER_KUBECONFIG\u003c/var\u003e \\\n -n \u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e \\\n delete deployment \u003cvar translate=\"no\"\u003eDEPLOYMENT_NAME\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eCLUSTER_KUBECONFIG\u003c/var\u003e: the kubeconfig file for the\n Kubernetes cluster.\n\n- \u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e: the project namespace of the container\n workload.\n\n- \u003cvar translate=\"no\"\u003eDEPLOYMENT_NAME\u003c/var\u003e: the name of the deployment to\n delete."]]