本指南說明如何在多區域環境中停用區域。
停用混合型區域
- 將 Kubernetes 內容設為需要停用的區域。
列出目前的環境,查看每個叢集的環境名稱:
kubectl config get-contexts
將環境設定為要停用的叢集和區域:
kubectl config use-context CONTEXT_NAME
其中 CONTEXT_NAME 是叢集和區域的環境名稱。
例如:
kubectl config get-contextsCURRENT 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 執行個體:apigeectl delete --all -f overrides.yaml
- 檢查目前的 Kubernetes Pod:
kubectl get pods -n apigee
kubectl get pods -n apigee-system - 將環境設為其他現有區域,並確認 Cassandra 資料中心已從現有環狀拓撲中移除。輸出內容不應顯示已移除的資料中心詳細資料。
kubectl exec apigee-cassandra-default-0 -n apigee -- nodetool -u JMX_USER -pw JMX_PASSWORD status