Ce guide explique la procédure à suivre pour mettre hors service une région dans un environnement multirégional.
Mettre hors service une région hybride
- Définissez les contextes Kubernetes sur la région à mettre hors service.
Répertoriez vos contextes actuels pour afficher le nom de contexte pour chaque cluster :
kubectl config get-contexts
Définissez le contexte du cluster et de la région que vous souhaitez mettre hors service :
kubectl config use-context
CONTEXT_NAME Où CONTEXT_NAME est le nom du contexte pour le cluster et la région.
Exemple :
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
-
Vérifiez que tous les pods de la région sont en cours d'exécution ou terminés :
kubectl get pods -n
apigee kubectl get pods -n apigee-system
-
Validez le lancement des composants à l'aide de Helm :
helm -n
apigee listhelm -n apigee-system list
Exemple :
helm -n apigee list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION datastore apigee 2 2024-03-29 17:08:07.917848253 +0000 UTC deployed apigee-datastore-1.12.0 1.12.0 ingress-manager apigee 2 2024-03-29 17:21:02.917333616 +0000 UTC deployed apigee-ingress-manager-1.12.0 1.12.0 redis apigee 2 2024-03-29 17:19:51.143728084 +0000 UTC deployed apigee-redis-1.12.0 1.12.0 telemetry apigee 2 2024-03-29 17:16:09.883885403 +0000 UTC deployed apigee-telemetry-1.12.0 1.12.0 exampleor apigee 2 2024-03-29 17:21:50.899855344 +0000 UTC deployed apigee-org-1.12.0 1.12.0 -
Validez l'état du cluster Cassandra.
Répertoriez les pods Cassandra :
kubectl get pods -n
APIGEE_NAMESPACE -l app=apigee-cassandraExemple :
kubectl get pods -n apigee -l app=apigee-cassandra
NAME READY STATUS RESTARTS AGE apigee-cassandra-default-0 1/1 Running 0 2h apigee-cassandra-default-1 1/1 Running 0 2h apigee-cassandra-default-2 1/1 Running 0 2h apigee-cassandra-default-3 1/1 Running 0 16m apigee-cassandra-default-4 1/1 Running 0 14m apigee-cassandra-default-5 1/1 Running 0 13m apigee-cassandra-default-6 1/1 Running 0 9m apigee-cassandra-default-7 1/1 Running 0 9m apigee-cassandra-default-8 1/1 Running 0 8m - Supprimez l'instance Apigee dans le contexte que vous venez de sélectionner:
Supprimez les composants un par un.
helm -n
apigee delete datastorehelm -n
apigee delete telemetryhelm -n
apigee delete ingress-managerhelm -n
apigee delete redishelm -n
apigee deleteORG_NAME Répétez la commande suivante pour chaque environnement:
helm -n
apigee deleteENV_NAME Répétez la commande suivante pour chaque groupe d'environnements:
helm -n
apigee deleteENV_GROUP_NAME helm -n apigee-system delete operator
- Vérifiez qu'il ne reste aucun pod dans les espaces de noms Apigee :
kubectl get pods -n
apigee kubectl get pods -n apigee-system
- 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