Dynamic Manifests
-
CI/CD Pipeline
- We will have a docker file
- Build the image(s) ,tag it, push it to registry
- image names are present in k8s manifests (hardcoded)
- Make changes in manifest and deploy (rollout)
- k8s manifests are static
-
we need to figure out a dynamic approach for manifest changes, there are two popular options
- helm
- kustomize
Helm
- This is considered the package manager of k8s
- Example:
- I need redis in my application
- Helm can install any existing applications like sqlserver, mysql, redis, kafka etc in your namespace by simple commands which will support rollout and rollbacks
- We can also use helm to create a package (chart) of our application
- Helm uses go templating for this
- Lets use Helm playground Refer Here
Exercise
- Create a nginx deployment with node port service for killer code
- Create a helm chart and delete everything in templates folder
- copy deployment.yaml and service.yaml
- In Values.yaml
- Create values for deployment and service
- Deploy this in killercoda
