2 min read | by Jordi Prats
Maybe the most common object used for deploying applications on Kubernetes is the Deployment object. It is intended to provide declarative updates for Pods at a controlled rate.
With a Deployment we are setting the desired state of a ReplicaSet. The Deployment controller will take the appropriate actions to adjust the ReplicaSet so it has the correct amount of Pods
The most relevant parts of a Deployment definition are:
A full example of a Deployment object is:
apiVersion: apps/v1 kind: Deployment metadata: name: demo-deploy spec: replicas: 6 selector: matchLabels: app: demo-deploy template: metadata: labels: app: demo-deploy spec: containers: - name: demo-deploy image: alpine:latest command: ["sleep"] args: ["1h"] ports: - name: http containerPort: 8000
Posted on 09/08/2021