This guide explains the procedure to decommission a region in a multi region environment.
Decommission a hybrid region
- Set the kubernetes contexts to the region that needs to be decommissioned.
List your current contexts to see the context name for each cluster:
kubectl config get-contexts
Set the context to the cluster and region you want to decommission:
kubectl config use-context
CONTEXT_NAME Where CONTEXT_NAME is the context name for the cluster and region.
For example:
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
- Delete the Apigee instance in the context you just selected with the
apigeectl
command:Delete the components one at a time.
helm -n
apigee delete datastorehelm -n
apigee delete telemetryhelm -n
apigee delete ingress-managerhelm -n
apigee delete redishelm -n
apigee deleteORG_NAME helm -n
apigee deleteENV_NAME helm -n
apigee deleteENV_GROUP_NAME helm -n apigee-system delete operator
$APIGEECTL_HOME/apigeectl delete --all -f
OVERRIDES_FILE .yaml - Verify there are no pods remaining in the Apigee namespaces:
kubectl get pods -n
apigee kubectl get pods -n apigee-system
kubectl get pods -n cert-manager
- Set the context to other existing regions and make sure the cassandra datacenter is removed
from the existing ring. The output should not show the removed data center details.
kubectl exec
apigee-cassandra-default-0 -napigee -- nodetool -uJMX_USER -pwJMX_PASSWORD status