Skip to content

Instantly share code, notes, and snippets.

@webwurst
Last active November 17, 2016 22:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webwurst/56589ac70c4ce7837681d2e7e815ed18 to your computer and use it in GitHub Desktop.
Save webwurst/56589ac70c4ce7837681d2e7e815ed18 to your computer and use it in GitHub Desktop.

Kubernetes

Running Containers and Exposing Services

Dashboard with Heapster

kubectl apply \
  --filename https://rawgit.com/kubernetes/dashboard/master/src/deploy/kubernetes-dashboard.yaml

kubectl apply \
  --filename https://raw.githubusercontent.com/giantswarm/kubernetes-heapster/master/manifests-all.yaml

Hands-on Basics

Monitoring and Logging

kubectl apply \
  --filename https://raw.githubusercontent.com/giantswarm/kubernetes-prometheus/master/manifests-all.yaml
minikube ssh
sudo sh -c "echo \"EXTRA_ARGS=' --log-opt labels=io.kubernetes.container.hash,io.kubernetes.container.name,io.kubernetes.pod.name,io.kubernetes.pod.namespace,io.kubernetes.pod.uid'\" >> /var/lib/boot2docker/profile"
sudo /etc/init.d/docker restart
kubectl apply \
  --filename https://raw.githubusercontent.com/giantswarm/kubernetes-elastic-stack/master/manifests-all.yaml

Twitter Example App

kubectl create namespace thux
kubectl --namespace thux apply --recursive --filename ./manifests
kubectl --namespace thux apply --filename _secrets-local/twitter-api-secret.yaml
kubectl --namespace thux scale deployments/tracker --replicas 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment