Cet article explique comment spécifier un espace de noms Kubernetes personnalisé pour cert-manager.
Dans la plupart des cas, cert-manager s'exécute dans l'espace de noms cert-manager. Certains utilisateurs peuvent appliquer des règles d'entreprise limitant la création d'espaces de noms Kubernetes ou définir des règles nécessitant l'exécution de cert-manager dans un autre espace de noms, par exemple kube-system.
Spécifier un espace de noms personnalisé pour cert-manager
Vérifiez que cert-manager est correctement installé dans le nouvel espace de noms à l'aide de la commande kubectl get pods :
kubectl get pods -n new-cert-manager-namespace
NAME READY STATUS RESTARTS AGE
cert-manager-1234567-abcde 1/1 Running 0 21s
cert-manager-cainjector-23456789a-bcdef 1/1 Running 0 22s
cert-manager-webhook-3456789ab-cdef0 1/1 Running 0 20s
Si cert-manager était déjà en cours d'exécution, supprimez l'instance cert-manager de l'espace de noms cert-manager en suivant les instructions de la section Désinstaller dans la documentation de cert-manager.
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/05 (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/05 (UTC)."],[[["\u003cp\u003eThis guide details the process of installing and running cert-manager in a custom Kubernetes namespace, diverging from the default \u003ccode\u003ecert-manager\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003eUsers can define a custom namespace for cert-manager using \u003ccode\u003ekubectl\u003c/code\u003e to create it and then modifying the installation manifests and the overrides file, instead of using the default namespace.\u003c/p\u003e\n"],["\u003cp\u003eThe installation process involves editing the manifests, adding a \u003ccode\u003ecertManager\u003c/code\u003e stanza to the overrides file with the desired namespace, and then using \u003ccode\u003ehelm\u003c/code\u003e to apply the changes.\u003c/p\u003e\n"],["\u003cp\u003eAfter installation, it is essential to verify that cert-manager is running correctly in the new namespace by checking the pod status with \u003ccode\u003ekubectl get pods\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIf a previous instance of cert-manager existed, users will need to delete it from the default \u003ccode\u003ecert-manager\u003c/code\u003e namespace before installing in the new namespace.\u003c/p\u003e\n"]]],[],null,["# Running cert-manager in a custom namespace\n\n| You are currently viewing version 1.14 of the Apigee hybrid documentation. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n\nThis topic explains how to specify a custom Kubernetes namespace for\n[cert-manager](https://cert-manager.io/).\n\nIn most cases, cert-manager runs in the `cert-manager` namespace. Some users may have\ncompany policies restricting the creation of new Kubernetes namespaces or have policies requiring\ncert-manager to be run in a different namespace, for example `kube-system`.\n\n\nSpecify a custom namespace for cert-manager\n-------------------------------------------\n\n1. Create the namespace if needed: \n\n ```\n kubectl create namespace new-cert-manager-namespace\n ```\n2. Install cert-manager following the instructions in [Installation:\n Introduction](https://cert-manager.io/v1.10-docs/installation/) in the cert-manager documentation. **Note:** You will have to edit the installation manifests to install cert-manager in a custom namespace.\n3. Add a [`certManager`](/apigee/docs/hybrid/v1.14/config-prop-ref#certmanager) stanza to your overrides file. \n\n ```\n certManager:\n namespace: new-cert-manager-namespace\n \n ```\n4. Apply the namespace change: Test with a dry run first:\n\n ```\n helm upgrade operator apigee-operator/ \\\n --install \\\n --namespace APIGEE_NAMESPACE \\\n --atomic \\\n -f OVERRIDES_FILE.yaml \\\n --dry-run=server\n ```\n\n Apply the change: \n\n ```\n helm upgrade operator apigee-operator/ \\\n --install \\\n --namespace APIGEE_NAMESPACE \\\n --atomic \\\n -f OVERRIDES_FILE.yaml\n ```\n5. Verify that cert-manager installed correctly in the new namespace with the `kubectl get pods` command: \n\n ```\n kubectl get pods -n new-cert-manager-namespace\n ``` \n\n ```\n NAME READY STATUS RESTARTS AGE\n cert-manager-1234567-abcde 1/1 Running 0 21s\n cert-manager-cainjector-23456789a-bcdef 1/1 Running 0 22s\n cert-manager-webhook-3456789ab-cdef0 1/1 Running 0 20s\n ```\n6. If cert manager had previoiusly been running, delete the `cert-manager` instance in the `cert-manager` namespace by following the instructions in [Uninstall\n in the cert-manager documentation](https://cert-manager.io/docs/installation/kubectl/#uninstalling)."]]