epcim
7/20/2017 - 12:30 PM

kubernetes kube k8s

kubernetes kube k8s

Node

A node is a worker machine in Kubernetes, previously known as a minion. A node may be a VM or physical machine, depending on the cluster. Each node has the services necessary to run pods and is managed by the master components…

Pod

A pod (as in a pod of whales or pea pod) is a group of one or more containers (such as Docker containers), the shared storage for those containers, and options about how to run the containers. Pods are always co-located and co-scheduled, and run in a shared context…

DaemonSet

A DaemonSet ensures that all (or some) nodes run a copy of a pod. As nodes are added to the cluster, pods are added to them. As nodes are removed from the cluster, those pods are garbage collected. Deleting a DaemonSet will clean up the pods it created…

#
NS=<namespace>

# get lates job logs
kubectl -n $NS describe job influx-influxdb-job-initdb |tail -n1 |sed -e 's/.*pod: //' |xargs kubectl -n $NS logs -f


# kubectl get
kubectl get
kubectl get all
kubectl get all --all-namespaces
kubectl get all -n cis
kubectl get cronjobs
kubectl get cronjobs -n cis
kubectl get deployments
kubectl get deployments -n cis
kubectl get node cmp01 -o yaml
kubectl get node cmp01 -o yaml | less
kubectl get nodes
kubectl get ns
kubectl get pod elasticsearch-data-cis-1 -n cis -o yaml
kubectl get pod -n cis influx-influxdb-job-initdb-HASH -o yaml
kubectl get pod -n cis influx-influxdb-job-initdb-HASH -o yaml | less
kubectl get pods
kubectl get pods --all-namespaces
kubectl get pods -n cis
kubectl get pods -n cis
kubectl get pods -n cis elasticsearch-data-cis-0 -o yaml | less
kubectl get pods -n cis | grep data
kubectl get pods -n cis -o wide
kubectl get services
kubectl get services -n cis
kubectl get statefulsets
kubectl get statefulsets -n cis