Accessing Deployments
Explore how to access and inspect Kubernetes Deployments and ReplicaSets using kubectl commands. Understand how rollouts and updates trigger changes in ReplicaSets, and learn to verify and describe these components for effective cluster management.
We'll cover the following...
We'll cover the following...
Let’s have a look at the deploy.yml file from the previous lesson. We’ll execute all these commands from the below terminal. Click the "Run" button to create a cluster.
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-deploy
spec:
replicas: 10
selector:
matchLabels:
app: hello-world
revisionHistoryLimit: 5
progressDeadlineSeconds: 300
minReadySeconds: 10
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
template:
metadata:
labels:
app: hello-world
spec:
containers:
- name: hello-pod
image: nigelpoulton/k8sbook:1.0
ports:
- containerPort: 8080
resources:
limits:
memory: 128Mi
cpu: 0.1Playground
Inspecting Deployments
We can use the normal kubectl get and kubectl describe ...