Configuring and deploying the Kubernetes Anjuna Webhook

In the previous section, you uploaded the Anjuna Nitro Kubernetes containers to AWS ECR. In this section, you will configure the Anjuna Webhook (which requires one of the containers that we just uploaded to ECR).

Run the following commands to configure and deploy the Anjuna Webhook:

$ ./anjuna-k8s.sh --generate-webhook-cert
$ ./anjuna-k8s.sh --deploy-webhook

The first command (./anjuna-k8s.sh --generate-webhook-cert) creates a certificate that allows the Anjuna Webhook to securely communicate with the Kubernetes cluster. The webhook works over secure transport layer for which a TLS certificate is needed. This step generates a TLS certificate signed by Kubernetes cluster signer.

The second command (./anjuna-k8s.sh --deploy-webhook) creates the configuration (configmap/secrets) to deploy the Anjuna Webhook, and starts a pod/service associated with the Anjuna Webhook. When this command completes, the Anjuna Webhook should be running as a pod in your cluster, waiting for requests to create pods that will run in a Nitro Enclave.

To confirm that the Anjuna Webhook is running, execute the following command:

$ kubectl get pods
NAME                       READY   STATUS    RESTARTS   AGE
anjuna-nitro-webhook-app   1/1     Running   0          22s

Congratulations, the Anjuna Webhook is installed in your cluster, and it is ready to intercept pod creation events and automatically create Nitro Enclaves.