Stopping and starting the containerized Continuous Compliance Engine
Overview
This article describes how to stop and start the containerized Delphix Continuous Compliance engine. For information on performing the tasks for the Virtual Machine Masking Engine, please see the documentation located in the document Starting, Stopping, and Restarting the Masking Engine.
Containerized deployments are dependent on a customer-created configuration file which can be named anything. For the purposes of this document, the default name of kubernetes-config.yaml
will be used. Also, any command-line examples will assume that this file is in the current directory to simplify the example.
Starting the containerized Masking Engine
Starting the engine is a simple matter of asking Kubernetes to create the Pod described by the Pod configuration file. This is done with a single kubectl
command.
$ kubectl create -f ./kubernetes-config.yaml
The Pod will take some time to start. The status of the Pod can be verified with another simple kubectl
command.
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
delphix-masking-0 3/3 Running 2 (5d14h ago) 13d
A Containerized Masking Pod consists of 3 containers. The above output demonstrates a Pod where 3/3 containers are READY
. This is a Pod that is up and running and ready to accept connections.
It is common for the first 2 containers of the Pod to enter a READY state very quickly and for the 3rd container to take some time to become ready. How long is dependent on a number of factors including the underlying infrastructure. (how powerful, how busy)
If the Pod STATUS
indicates an error or the number of restarts is consistently climbing, that indicates that there is a problem with the Pod and debugging will need to be done to determine the problem and the appropriate resolution.
Stopping the containerized Masking Engine
Stopping a running Pod is simple despite some confusing terminology. The Kubernetes terminology for stopping a Pod is delete
, but this command does not delete any of the containers or persistent volumes. It only stops the running Pod. The command to stop a running pod is of the same form as starting the Pod.
$ kubectl delete -f ./kubernetes-config.yaml
This tells Kubernetes to shut down whatever it previously started. Because the Containerized Masking Engine is a Stateful application, it has persistent storage. This persistent storage is not deleted when the Pod is shut down.
If a Pod that was shut down is then restarted, it will attempt to re-attach any persistent storage defined in the kubernetes-config.yaml
file.
Removing persistent volumes / persistent volume claims
If it is necessary to delete any persistent volumes (PVs) and persistent volume claims (PVCs) associated with the Pod, that will have to be done manually. It is possible to locate any PVs and PVCs that exist with some simple kubectl
commands.
$ kubectl get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
pvc-7fe1d352-de17-4132-b2a1-152f4e9cfefc 20Gi RWX Delete Bound container-registry/registry-claim microk8s-hostpath 183d
pvc-a7275ce3-b630-4d4c-9712-b5124358cb7f 4Gi RWO Delete Bound default/masking-persistent-storage-delphix-masking-0 microk8s-hostpath 15d
nfs-pv 500Mi RWO Retain Bound default/nfs-pvc nfs-storage 13d
$ kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
masking-persistent-storage-delphix-masking-0 Bound pvc-a7275ce3-b630-4d4c-9712-b5124358cb7f 4Gi RWO microk8s-hostpath 15d
nfs-pvc Bound nfs-pv 500Mi RWO nfs-storage 13d
To completely remove a Pod (a clean slate) would require the removal of any PVs and PVCs associated with the Pod. The first step is to shut down the Pod. Once the Pod is no longer running, removing the PVC will frequently also remove the associated PV.
Removing either the PV or PVC is a simple matter of using the appropriate kubectl
command. To illustrate removing a PVC, simply take note of the name of the object. From the example output above, there is a PVC named masking-persistent-storage-delphix-masking-0
. To remove it, use the following command.
$ kubectl delete pvc masking-persistent-storage-delphix-masking-0