Skip to content

Latest commit

 

History

History
 
 

recreate

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Recreate

A deployment defined with a strategy of type Recreate will terminate all the running instances then recreate them with the newer version.

recreate

Go to the right directory

cd ~/Workshop-K8S/k8s/recreate/

Create namespace

kubectl create ns recreate

Deploy App v1

kubectl apply -n recreate -f app-v1.yaml

Test:

curl http://[public ip adress load balancer]/api

Or in browser: <http://[public ip adress load balancer]

Deploy App v2

kubectl apply -n recreate -f app-v2.yaml

Downtime is expected because v1 is killed before v2 is started and healthy:

curl http://[public ip adress load balancer]/api

Or in browser: <http://[public ip adress load balancer]

Clean up

kubectl delete ns recreate