Skip to content

Instantly share code, notes, and snippets.

@DrSnowbird
Created August 7, 2018 04:20
Show Gist options
  • Save DrSnowbird/40ae3385b76f83a2aafc211e49cdc219 to your computer and use it in GitHub Desktop.
Save DrSnowbird/40ae3385b76f83a2aafc211e49cdc219 to your computer and use it in GitHub Desktop.
# Create a deployment
kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080
# Create a service
kubectl expose deployment hello-minikube --type=NodePort
# List the pods
kubectl get pod
# List the service
kubectl get service
# Test the service
curl $(minikube service hello-minikube --url)/health
# List the ReplicaSets
kubectl get rs
# Scale the ReplicaSet
kubectl scale deployments/hello-minikube --replicas=3
# List the pods
kubectl get pod
# Test the service
curl $(minikube service hello-minikube --url)/health3
# Show the dashboard
open $(minikube service kubernetes-dashboard --namespace=kube-system --url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment