Helm/Grafana

From Chorke Wiki
Jump to navigation Jump to search
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
helm repo list

Config

export KUBECONFIG="${HOME}/.kube/dev-kubeconfig.yaml"
export KUBECONFIG="${HOME}/.kube/gcp-kubeconfig.yaml"
export KUBECONFIG="${HOME}/.kube/config"

Install

kubectl create namespace grafana
cat <<YML | helm install -n grafana grafana grafana/grafana -f -
ingress:
  enabled: true
  hosts:
  - grafana.k8s.local
YML

Uninstall

helm uninstall -n grafana grafana
helm delete    -n grafana grafana

Playground

helm upgrade --install -f values.yaml grafana grafana/grafana
helm upgrade --install grafana grafana/grafana
helm show values grafana/grafana
kubectl exec -n grafana -it grafana-6fd8886fd4-4vwgh -- cat /etc/os-release
kubectl exec -n grafana -it grafana-6fd8886fd4-4vwgh -- bash
kubectl exec -n grafana -it grafana-6fd8886fd4-4vwgh -- sh

kubectl delete all --all -n grafana
kubectl delete ing --all -n grafana
kubectl delete sts --all -n grafana
kubectl delete svc --all -n grafana
kubectl delete pvc --all -n grafana
kubectl delete pv  --all -n grafana

kubectl logs -f grafana-6fd8886fd4-4vwgh -n grafana
kubectl rollout restart deploy grafana -n grafana
kubectl rollout restart sts grafana -n grafana
kubectl logs -f grafana-hash -n grafana
kubectl config --kubeconfig=${HOME}/.kube/aws-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/dev-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/gcp-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/config view --flatten

References