このトピックでは、cert-manager 用のカスタム Kubernetes Namespace を指定する方法について説明します。
ほとんどの場合、cert-manager は cert-manager Namespace で実行されますが、新しい Kubernetes Namespace の作成を制限する会社のポリシーや、cert-manager を別の Namespace(kube-system など)で実行することを要求するポリシーが設定されている場合があります。
cert-manager のカスタム Namespace を指定する
- 必要に応じて Namespace を作成します。
kubectl create namespace new-cert-manager-namespace
- cert-manager ドキュメントのインストール: 概要の手順に沿って、cert-manager をインストールします。
certManagerスタンザをオーバーライド ファイルに追加します。certManager: namespace: new-cert-manager-namespaceapigeectl initを使用して Namespace の変更を適用します。apigeectl init -f path-to-overrides.yaml
kubectl get podsコマンドを使用して、新しい Namespace に cert-manager が正しくインストールされていることを確認します。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
- 証明書マネージャーが以前に実行されていた場合は、cert-manager のドキュメントでアンインストール手順を確認して、
cert-managerNamespace 内のcert-managerインスタンスを削除します。