April 2018
Intermediate to advanced
468 pages
14h 34m
English
Here is the deployment, which is very similar to the Hue-learner deployment, except that I dropped the annotations, env, and resources sections, kept just one label to save space, and added a ports section to the container. That's crucial, because a service must expose a port through which other services can access it:
apiVersion: apps/v1a1kind: Deploymentmetadata: name: hue-remindersspec: replicas: 2 template: metadata: name: hue-reminders labels: app: hue-reminders spec: containers: - name: hue-reminders image: g1g1/hue-reminders:v2.2 ports: - containerPort: 80
When we run the deployment, two Hue reminders pods are added to the cluster:
> kubectl create -f hue-reminders-deployment.yaml > kubectl get pods ...
Read now
Unlock full access