Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
Makefile
README.rst
kube-api-service.yaml
kube-demo-api.yaml

README.rst

Rolling-updates with Kubernetes

Prereq

Deploy docker images to hub.docker.com, see Makefile

With minikube

minikube start
kubectl config use-context minikube

kubectl apply -f kube-api-service.yaml

# deployment
kubectl apply -f kube-demo-api.yaml

# notice, it takes longer time due to the initialDelaySeconds
kubectl get po

export SVC_PORT=$(kubectl get service demo-api --output='jsonpath="{.spec.ports[0].nodePort}"' | tr -d '"')

curl $(minikube ip):${SVC_PORT}
# in one terminal window:
watch -n0.3 -x curl -s $(minikube ip):${SVC_PORT}

# in another terminal window
watch -n0.3 -x kubectl get po

# upgrade
kubectl set image  deployment/demo-api app=wojciech11/api-status:2.0.0

How to ensure, we wait for all the request to be closed?

Use:

terminationGracePeriodSeconds: 60

See: traefik-ds.yaml

You can’t perform that action at this time.