Kubernetes: Difference between revisions

From Federal Burro of Information
Jump to navigationJump to search
Line 2: Line 2:
== Useful ==
== Useful ==


=== Dump all ===
alias:
 
alias k="kubectl"
alias ks="kubectl --namespace kube-system"


dump all :  
dump all :  
Line 17: Line 20:


  kubectl get events --sort-by=.metadata.creationTimestamp
  kubectl get events --sort-by=.metadata.creationTimestamp
what storage classes does my cluster support?
k get storageclass


== Practices and Guidlines ==
== Practices and Guidlines ==

Revision as of 14:03, 20 September 2018

Useful

alias:

alias k="kubectl"
alias ks="kubectl --namespace kube-system"

dump all :

kubectl get all --export=true -o yaml

list form:

k get pods
k get rs # replica set
k get rc # replication controller

event sorted by time

kubectl get events --sort-by=.metadata.creationTimestamp

what storage classes does my cluster support?

k get storageclass

Practices and Guidlines

  • Do not use replication controllers, instead use replica sets

Cgroup / slice errors

https://github.com/kubernetes/kubernetes/issues/56850

log message:

Sep 18 21:32:37 ip-10-10-37-50 kubelet[1681]: E0918 21:32:37.901058    1681 summary.go:92] Failed to get system container stats for "/system.slice/docker.service": failed to get cgroup stats for "/system.slice/docker.service": failed to get container info for "/system.slice/docker.service": unknown container "/system.slice/docker.service"

MAAS ubuntu

https://stripe.com/blog/operating-kubernetes

https://cloudplatform.googleblog.com/2018/05/Kubernetes-best-practices-Setting-up-health-checks-with-readiness-and-liveness-probes.html

https://medium.com/@adriaandejonge/moving-from-docker-to-rkt-310dc9aec938

https://coreos.com/rkt/docs/latest/rkt-vs-other-projects.html#rkt-vs-docker

https://hackernoon.com/docker-containerd-standalone-runtimes-heres-what-you-should-know-b834ef155426?gi=3c7edac0b22d


Security

Todo / read:

References and Reading

Replica set versus Replication controller
https://www.mirantis.com/blog/kubernetes-replication-controller-replica-set-and-deployments-understanding-replication-options/