D.1 Manual Shutdown of NRF
This section provides the procedure to graceful shutdown of NRF deployment.
- Run the following command to retrieve the replica count for the NRF
microservices
Note:
Before running graceful shutdown, note down the replica count for the NRF microservices.kubectl -n <NRF Namespace> get deployments
Where,
<NRF Namespace>
is the namespace where NRF is deployedFor example:
kubectl -n usw2az1001np-ns-or-nrf-001 get deployments
Sample output:NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/or-nrf001c-use1az2n01p-appinfo 1/1 1 1 36h deployment.apps/or-nrf001c-use1az2n01p-egressgateway 1/1 1 1 36h deployment.apps/or-nrf001c-use1az2n01p-ingressgateway 1/1 1 1 36h deployment.apps/or-nrf001c-use1az2n01p-nfdiscovery 1/1 1 1 36h deployment.apps/or-nrf001c-use1az2n01p-nfregistration 1/1 1 1 36h deployment.apps/or-nrf001c-use1az2n01p-nfsubscription 1/1 1 1 36h deployment.apps/or-nrf001c-use1az2n01p-nrfauditor 1/1 1 1 36h deployment.apps/or-nrf001c-use1az2n01p-nrfconfiguration 1/1 1 1 36h
Note:
Note down the replica count for NRF Auditor, Ingress Gateway, and Egress Gateway. This replica count value is used while restoring back the NRF deployment. - Scale down the pods on NRF for NRF Auditor, Ingress Gateway, and Egress Gateway, as
follows:
- Change the NRF Auditor replicaSet to
0:
kubectl -n <NRF Namespace> get deployments | egrep 'nrfauditor' | awk '{print $1}' | xargs -L1 -r kubectl -n <NRF Namespace> scale deployment --replicas=0
For example:kubectl -n usw2az1001np-ns-or-nrf-001 get deployments | egrep 'nrfauditor' | awk '{print $1}' | xargs -L1 -r kubectl -n usw2az1001np-ns-or-nrf-001 scale deployment --replicas=0
Sample output:$ kubectl -n use1az2001np-ns-or-nrf-001 get deployments | egrep 'nrfauditor' | awk '{print $1}' | xargs -L1 -r kubectl -n use1az2001np-ns-or-nrf-001 scale deployment --replicas=0 deployment.apps/or-nrf001c-use1az2n01p-nrfauditor scaled
- Change Ingress Gateway replicaSet to
0:
kubectl -n <NRF Namespace> get deployments | egrep 'ingressgateway' | awk '{print $1}' | xargs -L1 -r kubectl -n <OCNRF Namespace> scale deployment --replicas=0
For example:kubectl -n usw2az1001np-ns-or-nrf-001 get deployments | egrep 'ingressgateway' | awk '{print $1}' | xargs -L1 -r kubectl -n usw2az1001np-ns-or-nrf-001 scale deployment --replicas=0
Sample output:$ kubectl -n use1az2001np-ns-or-nrf-001 get deployments | egrep 'ingressgateway' | awk '{print $1}' | xargs -L1 -r kubectl -n use1az2001np-ns-or-nrf-001 scale deployment --replicas=0 deployment.apps/or-nrf001c-use1az2n01p-ingressgateway scaled
- Change Egress Gateway replicaSet to
0:
kubectl -n <NRF Namespace> get deployments | egrep 'egressgateway' | awk '{print $1}' | xargs -L1 -r kubectl -n <NRF Namespace> scale deployment --replicas=0
For example:kubectl -n usw2az1001np-ns-or-nrf-001 get deployments | egrep 'egressgateway' | awk '{print $1}' | xargs -L1 -r kubectl -n usw2az1001np-ns-or-nrf-001 scale deployment --replicas=0
Sample output:$ kubectl -n use1az2001np-ns-or-nrf-001 get deployments | egrep 'egressgateway' | awk '{print $1}' | xargs -L1 -r kubectl -n use1az2001np-ns-or-nrf-001 scale deployment --replicas=0 deployment.apps/or-nrf001c-use1az2n01p-egressgateway scaled
- Change the NRF Auditor replicaSet to
0:
- Run the following command to verify that the deployment and pods for NRF Auditor,
Ingress Gateway, and Egress Gateway are
down:
kubectl -n <NRF Namespace> get pods,deployments
For example:kubectl -n usw2az1001np-ns-or-nrf-001 get pods,deployments
Sample output:$ kubectl -n use1az2001np-ns-or-nrf-001 get pods,deployments NAME READY STATUS RESTARTS AGE pod/or-nrf001c-use1az2n01p-appinfo-7bb648b6cb-4knk2 2/2 Running 0 36h pod/or-nrf001c-use1az2n01p-egressgateway-7c44dd664-zg5rx 2/2 Terminating 0 36h pod/or-nrf001c-use1az2n01p-ingressgateway-7678c78c9d-gwdrd 2/2 Terminating 0 36h pod/or-nrf001c-use1az2n01p-nfdiscovery-6fdcfdbbd9-sfrwt 2/2 Running 0 36h pod/or-nrf001c-use1az2n01p-nfregistration-568986fd5-4j2pf 2/2 Running 0 36h pod/or-nrf001c-use1az2n01p-nfsubscription-549b474747-9s5qv 2/2 Running 0 36h pod/or-nrf001c-use1az2n01p-nrfauditor-69544798cc-q7pbw 2/2 Terminating 0 36h pod/or-nrf001c-use1az2n01p-nrfconfiguration-894759544-zzsqg 2/2 Running 0 36h NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/or-nrf001c-use1az2n01p-appinfo 1/1 1 1 36h deployment.apps/or-nrf001c-use1az2n01p-egressgateway 0/0 0 0 36h deployment.apps/or-nrf001c-use1az2n01p-ingressgateway 0/0 0 0 36h deployment.apps/or-nrf001c-use1az2n01p-nfdiscovery 1/1 1 1 36h deployment.apps/or-nrf001c-use1az2n01p-nfregistration 1/1 1 1 36h deployment.apps/or-nrf001c-use1az2n01p-nfsubscription 1/1 1 1 36h deployment.apps/or-nrf001c-use1az2n01p-nrfauditor 0/0 0 0 36h deployment.apps/or-nrf001c-use1az2n01p-nrfconfiguration 1/1 1 1 36h