To demonstrate ConfigMaps by swithing Transfomer services between 'disguised' and 'robot' modes in minikube.
Docker (https://docs.docker.com/install/) and minikube (https://kubernetes.io/docs/tasks/tools/install-minikube/) installed.
Start minikube:
minikube start --memory 4000 --cpus 3
Build images for Transformers - from this directory run
eval $(minikube docker-env)
mvn clean install
Deploy the Autobots (their ConfigMap has them as in robot mode)
kubectl create -f autobots --save-config
To see the autobots:
minikube service optimus-prime-entrypoint
minikube service gears-entrypoint
Deploy the Decepticons (their ConfigMap has them disguised)
kubectl create -f decepticons --save-config
minikube service megatron-entrypoint
minikube service shockwave-entrypoint
To change config there are options.
Do minikube dashboard
to open the dashboard in the browser, go to 'Config Maps' under 'Config and Storage' and e.g. change the Decepticons to 'robot'. Then do:
kubectl scale deployment/megatron --replicas=0;
kubectl scale deployment/megatron --replicas=2;
Edit the .yml files for each transformer in the autobots and decepticons directories to point to v2 of the config. Then do:
kubectl apply -f autobots --record
kubectl apply -f decepticons --record
Note it can take a while for the rolling update to be fully applied and also beware the browser cache (and dep on your minikube version you may hit kubernetes/kubernetes#55667).
To remove:
kubectl delete -f autobots
kubectl delete -f decepticons
Stop minikube with minikube stop
See the helm directory for instructions