Skip to content

zharalim/learning-kubernetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

learning-kubernetes

Repo for learning how to use Kubernetes and Helm charts with the help of Kubernetes in Action book.

  1. Create GKE project
  2. gcloud auth login
  3. gcloud config set project <GCP PROJECT ID>
  4. Run gcloud auth configure-docker
  5. Run refresh.sh to update docker image to google docker repository
  6. Connect kubectl to your cluster w/ gcloud container
  7. kubectl create serviceaccount --namespace kube-system tiller
  8. kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
  9. helm init --service-account tiller
  10. Install with helm install --name test -f secrets.yml node-app-helm

Try db connection:

  1. Get pods kubectl get po -o wide
  2. kubectl port-forward <pod id> 8888:8888
  3. From another shell run curl localhost:8888

Commands

  • After changes upgrade with helm upgrade test -f secrets.yml ./node-app-helm
  • Run tests with helm test --cleanup test
  • Delete chart with helm delete test --purge
  • See why pod initialization fails kubectl describe po <pod id>
  • List pods kubectl get po

Tests

Test node network failure

  1. Get a list of your nodes gcloud compute instances list
  2. ssh to a kube node gcloud compute ssh <node name>
  3. ifconfig eth0 down
  4. gcloud compute instances reset <node>

Notes

About

Repository for learning Kubernetes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published