Stop the Container Gateway in OpenShift

This topic describes some generic methods to stop a running pod inside an OpenShift environment. The sample commands and methods shown here are not specific to the Container Gateway. They are generic to deployed pods inside an OpenShift environment.
gateway
This topic describes some generic methods to stop a running pod inside an OpenShift environment. The sample commands and methods shown here are not specific to the Container Gateway. They are generic to deployed pods inside an OpenShift environment.
Contents:
Stopping with oc cli
The following are some sample
oc cli
operations to stop a running pod:
  • oc delete
    (deleting a specific object inside the OpenShift environment) - A sample command to remove a specific pod
    oc delete pod
    <pod name>
    For example:
    oc delete pod container-gateway-55-gki30d 
  • oc scale
    (scale to 0)
    oc scale --replicas=0 dc container-gateway-dc
    If you stop a running pod by scaling to zero, auto-scale is suppressed, even if it was enabled. No new pods are created. Use the
    scale
    command with caution when auto-scaling is configured.
Stopping with OpenShift Console
  1. Remove a running pod by clicking
    delete
    from the Actions drop-down on the details page of the pod. Note that the deployment configuration will auto-deploy a new pod when you delete it. Refer to the next point on how to work around this.
  2. Modify the deployment configuration (Applications > Deployments > container-gateway-dc). You can choose to pause the deployment. After pausing the deployment, you can safely remove running pod(s) without the deployment auto-deploying new instances.
  3. Scale the container-gateway-svc to 0.
    1. You need to remove auto-scaling to enable manual scaling. Do this by looking in the
      container-gateway-dc
      resource and then clicking
      Remove
      in the Auto-scaling section.
    2. In the Overview tab, click the down-arrow next to the pod circle to scale it to 0. This effectively removes all running pods.