Evolution of application deployment over the past 20 years.
Configure your local and remote lab environments.
Covers the resource types that are included with Kubernetes.
•Pod
•Job
Using helm to manage Kubernetes resources
Example microservice application.
Kubernetes manifests to deploy the demo application.
Explore how custom resources can add functionality
Install additional software to enhance the deployment.
Improving the DevX when working with Kubernetes.
How to safely upgrade your clusters and nodes.
Implement CI/CD for your applications (with GitOps!)
Helm is a package manager and templating engine for Kubernetes. This section shows how a simple chart can be used to deploy the api-golang
service to different environments.
The sample chart lives in the course repository under 12-deploying-to-multiple-environments/helm
.
Its structure looks like:
api-golang-helm-chart/
Chart.yaml
values.yaml
values.production.yaml
templates/
Chart.yaml
defines metadata for the chart. The default values.yaml
exposes a few settings:
environmentPostfix: ""
replicas: 1
version: DEFAULT_VERSION
The templates use these values. For example Deployment.yaml
injects the image tag and replica count:
spec:
replicas: {{ .Values.replicas }}
containers:
- name: api-golang
image: sidpalas/devops-directive-docker-course-api-golang:{{ .Values.version }}
IngressRoute.yaml
appends environmentPostfix
to the hostname so each environment can have a unique URL.
Preview the generated manifests with helm template
:
helm template ./api-golang-helm-chart | yq
helm template ./api-golang-helm-chart --values values.production.yaml | yq
The accompanying Taskfile.yaml
provides tasks such as task template-production
to make this easier.
Deploy the service by running:
helm upgrade --install api-golang ./api-golang-helm-chart \
-f values.production.yaml -n demo-app
Passing different values files lets the same chart configure multiple environments.
Charts can be packaged and pushed to a registry:
helm package ./api-golang-helm-chart
helm push api-golang-helm-chart-0.1.0.tgz oci://registry-1.docker.io/sidpalas
These commands (also available via task package
and task push
) produce a .tgz
artifact and upload it for others to consume.