במאמר הזה מוסבר איך מציינים מרחב שמות מותאם אישית של Kubernetes בשביל cert-manager.
ברוב המקרים, cert-manager פועל במרחב השמות cert-manager. יכול להיות שלחלק מהמשתמשים יש מדיניות חברה שמגבילה את היצירה של מרחבי שמות חדשים ב-Kubernetes, או מדיניות שמחייבת להפעיל את cert-manager במרחב שמות אחר, למשל kube-system.
ציון מרחב שמות מותאם אישית ל-cert-manager
- יוצרים את מרחב השמות אם צריך:
kubectl create namespace new-cert-manager-namespace
- מתקינים את cert-manager לפי ההוראות במאמר Installation: Introduction (התקנה: מבוא) במסמכי התיעוד של cert-manager.
- מוסיפים בית
certManagerלקובץ ההגדרות.certManager: namespace: new-cert-manager-namespace - מחילים את השינוי במרחב השמות:
Helm
כדאי לבדוק קודם באמצעות הרצת בדיקה:
helm upgrade operator apigee-operator/ \ --install \ --namespace apigee-system \ --atomic \ -f OVERRIDES_FILE.yaml \ --dry-run
מחילים את השינוי:
helm upgrade operator apigee-operator/ \ --install \ --namespace apigee-system \ --atomic \ -f OVERRIDES_FILE.yaml
apigeectl$APIGEECTL_HOME/apigeectl init -f OVERRIDES_FILE.yaml
- מוודאים ש-cert-manager הותקן בצורה תקינה במרחב השמות החדש באמצעות הפקודה
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
- אם מנהל האישורים פעל בעבר, צריך למחוק את מופע
cert-managerבמרחב השמותcert-managerלפי ההוראות שבקטע Uninstall in the cert-manager documentation (הסרה במסמכי התיעוד של מנהל האישורים).