Skip to content

Instantly share code, notes, and snippets.

@vfarcic vfarcic/04-rs.sh
Created Dec 10, 2017

Embed
What would you like to do?
minikube start --vm-driver=virtualbox
kubectl config current-context
cd k8s-specs
git pull
cat rs/go-demo-2.yml
kubectl create -f rs/go-demo-2.yml
kubectl get rs
kubectl get -f rs/go-demo-2.yml
kubectl describe -f rs/go-demo-2.yml
kubectl get pods --show-labels
kubectl delete -f rs/go-demo-2.yml \
--cascade=false
kubectl get rs
kubectl get pods
kubectl create -f rs/go-demo-2.yml \
--save-config
kubectl get pods
kubectl apply -f rs/go-demo-2-scaled.yml
kubectl get pods
POD_NAME=$(kubectl get pods -o name \
| tail -1)
kubectl delete $POD_NAME
kubectl get pods
POD_NAME=$(kubectl get pods -o name \
| tail -1)
kubectl label $POD_NAME service-
kubectl describe $POD_NAME
kubectl get pods
kubectl label $POD_NAME service=go-demo-2
kubectl get pods
minikube delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.