本指南說明在多地區環境中停用地區的程序。
停用混合型區域
- 將 Kubernetes 結構定義設為需要停用的區域。
列出目前的背景資訊,查看每個叢集的背景資訊名稱:
kubectl config get-contexts
將結構定義設為要停用的叢集和區域:
kubectl config use-context CONTEXT_NAME
其中 CONTEXT_NAME 是叢集和區域的內容名稱。
例如:
kubectl config get-contexts
CURRENT NAME CLUSTER AUTHINFO NAMESPACE gke_example-org-1_us-central1_example-cluster-1 gke_example-org-1_us-central1_example-cluster-1 gke_example-org-1_us-central1_example-cluster-1 apigee * gke_example-org-1_us-central1_example-cluster-2 gke_example-org-1_us-central1_example-cluster-2 gke_example-org-1_us-central1_example-cluster-2 apigee gke_example-org-1_us-west1_example-cluster-2 gke_example-org-1_us-west1_example-cluster-2 gke_example-org-1_us-west1_example-cluster-2 apigeekubectl config use-context gke_example-org-1_us-west1_example-cluster-2
- 使用
apigeectl
指令,刪除您剛才選取的脈絡中的 Apigee 執行個體:Helm
逐一刪除元件。
helm -n apigee delete datastore
helm -n apigee delete telemetry
helm -n apigee delete ingress-manager
helm -n apigee delete redis
helm -n apigee delete ORG_NAME
helm -n apigee delete ENV_NAME
helm -n apigee delete ENV_GROUP_NAME
helm -n apigee-system delete operator
apigeectl
$APIGEECTL_HOME/apigeectl delete --all -f OVERRIDES_FILE.yaml
- 確認 Apigee 命名空間中沒有任何剩餘的 Pod:
kubectl get pods -n apigee
kubectl get pods -n apigee-system
kubectl get pods -n cert-manager
- 將背景設定為其他現有區域,並確認從現有環中移除 Cassandra 資料中心。輸出內容不應顯示已移除的資料中心詳細資料。
kubectl exec apigee-cassandra-default-0 -n apigee -- nodetool -u JMX_USER -pw JMX_PASSWORD status