Skip to content

Instantly share code, notes, and snippets.

@initcron
Last active October 16, 2025 16:30
Show Gist options
  • Save initcron/3070a55e0e1cf939fcb02c9f232c38f9 to your computer and use it in GitHub Desktop.
Save initcron/3070a55e0e1cf939fcb02c9f232c38f9 to your computer and use it in GitHub Desktop.

switch to instavote namespace

kubectl config set-context --current --namespace=instavote
helm uninstall -n dev instavote 
kubectl delete deploy vote redis db result worker  -n instavote 
kubectl delete svc vote redis db result  -n instavote 

cd k8s-code/projects/instavote/dev/

#only if you do not find k8s-code in the path run this 
# git clone https://github.com/initcron/k8s-code.git

create result deploy

kubectl create deploy result --image=schoolofdevops/vote-result --dry-run -o yaml | tee results-deploy.yaml
kubectl create deploy worker --image=schoolofdevops/worker:latest --dry-run -o yaml | tee worker-deploy.yaml

while applying the code, you may need to change

node-role.kubernetes.io/master

to

node-role.kubernetes.io/control-plane

and also change

apiVersion: extensions/v1beta1 

to

apiVersion: apps/v1

as necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment