Skip to content

Instantly share code, notes, and snippets.

@ayinlaaji
Last active June 8, 2019 18:45
Show Gist options
  • Select an option

  • Save ayinlaaji/02cc2130c54fe095b5c07799ed1048d2 to your computer and use it in GitHub Desktop.

Select an option

Save ayinlaaji/02cc2130c54fe095b5c07799ed1048d2 to your computer and use it in GitHub Desktop.
Kubernetes snippets

ISTIO

Installation

for i in install/kubernetes/helm/istio-init/files/crd*yaml; do kubectl apply -f $i; done

Deletion

for i in install/kubernetes/helm/istio-init/files/crd*yaml; do kubectl delete -f $i; done

Deploy application

  • with automatic side car injection kubectl label namespace istio-injection=enabled kubectl create -n -f .yaml

  • manually side car injection istioctl kube-inject -f .yaml | kubectl apply -f -

K8s docker for desktop dashboard

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml

http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

TOKEN=((kubectl -n kube-system describe secret default | Select-String "token:") -split " +")[1] && kubectl config set-credentials docker-for-desktop --token="${TOKEN}"

Grafana

https://istio.io/docs/tasks/telemetry/metrics/using-istio-dashboard/

$ kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=grafana -o jsonpath='{.items[0].metadata.name}') 3000:3000 &

http://localhost:3000/dashboard/db/istio-mesh-dashboard

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