Dismissione di un'area geografica ibrida

Questa guida spiega la procedura per il ritiro di una regione in un ambiente multiregione.

Dismissione di un'area geografica ibrida

  1. Imposta i contesti Kubernetes sulla regione che deve essere dismessa.

    Elenca i tuoi contesti attuali per vedere il nome del contesto per ogni cluster:

    kubectl config get-contexts

    Imposta il contesto sul cluster e sulla regione da rimuovere:

    kubectl config use-context CONTEXT_NAME

    Dove CONTEXT_NAME è il nome del contesto per il cluster e la regione.

    Ad esempio:

    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       apigee
    
    kubectl config use-context gke_example-org-1_us-west1_example-cluster-2
  2. Verifica che tutti i pod nella regione siano in esecuzione o completati:
    kubectl get pods -n apigee
    kubectl get pods -n apigee-system
  3. Convalida la release dei componenti utilizzando Helm:
    helm -n apigee list
    helm -n apigee-system list

    Ad esempio:

    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
  4. Convalida lo stato del cluster Cassandra.

    Elenca i pod Cassandra:

    kubectl get pods -n APIGEE_NAMESPACE -l app=apigee-cassandra

    Ad esempio:

    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
  5. Elimina l'istanza Apigee nel contesto che hai appena selezionato:

    Eliminare i componenti uno alla volta.

    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
    

    Ripeti questo comando per ogni ambiente:

    helm -n apigee delete ENV_NAME
    

    Ripeti il seguente comando per ogni gruppo di ambienti:

    helm -n apigee delete ENV_GROUP_NAME
    
    helm -n apigee-system delete operator
    
  6. Verifica che non siano rimasti pod negli spazi dei nomi Apigee:
    kubectl get pods -n apigee
    kubectl get pods -n apigee-system
    
  7. 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 -n apigee  -- nodetool -u JMX_USER -pw JMX_PASSWORD status