Kubernetes deployment

nShield Containers can be used in a Kubernetes deployment.

Example setup

A set of example Kubernetes configuration files has been provided in /opt/nfast/containers/kubernetes. These example files can be used to create a deployment containing a pod made up of a hardserver and application container. The deployment uses volume claims for data and secrets for sensitive material. Each container has health checks configured using the healthcheck utility. This executes Cmd_GetModuleState on all configured modules.

Create the hardserver and application images using the commands in Hardserver containers and Application containers, and configure the deployment as shown below. The image tags must match those in the deployment configuration files.

$ cd /opt/nfast/containers/kubernetes/
$ kubectl apply -f 00-namespace.yml
$ kubectl apply -f 01-hostpath-volume.yml
$ kubectl apply -f 02-volume-claims.yml
$ bash 03-populate-volumes.sh <path to hardserver kneti> <path to config> <path to kmlocal>
$ kubectl apply -f 03-deployment.yml
$ kubectl wait -f 03-deployment.yml --timeout=3m --for=condition=Available