Now that we have the images for our Pod, the final step is to deploy the controller by using a Deployment. We can see the main parts of the Deployment in Example 22-5 (the full version can be found in our example repository). ServiceAccount with proper permissions for watching events and restarting Pods Ambassador  container for proxying localhost to the Kubeserver API Main container holding all tools and mounting the controller script Startup command calling the controller script Volume mapped to the ConfigMap holding our script Mount of the ConfigMap-backed volume into the main Pod As you can see, we mount the  config-watcher-controller-script  from the Con‐ figMap we have created previously and directly use it as the startup command for the primary container. For simplicity reasons, we omitted any liveness and readiness checks as well as resource limit declarations. Also, we need a ServiceAccount  config- 184  |  Chapter 22: Controller Example 22-5. Controller Deployment apiVersion : apps/v1 kind : Deployment # .... spec : template : # ... spec : serviceAccountName : config-watcher-controller containers : -  name : kubeapi-proxy image : k8spatterns/kubeapi-proxy -  name : config-watcher image : k8spatterns/curl-jq # ... command : - "sh" - "/watcher/config-watcher-controller.sh" volumeMounts : -  mountPath : "/watcher" name : config-watcher-controller volumes : -  name : config-watcher-controller configMap : name : config-watcher-controller