4. Pod vs.
Deployment
- Pod - the smallest unit and cannot
split for runtime
- Replica Set - definition of replicas of
pod
- Deployment - the summary of
pod/replica set
7. State of Pod
- Stateful Set - long time running, data
need persistent as possible
- Deployment - short time live,
sessionless and quick startup
From: https://blog.openshift.com/kubernetes-state-storage/
11. Service expose
- Service - the network entrypoint of
running pods, with service ip address
and can define some network
parameters
12. Ingress
- Layer 7 load balancer and provide
configurable rules for dispatch
traffics to backend deployments
13. Storage Class
- Storage as a service, let user can
define the storage and provide to
pod for use
From: https://cloud.ibm.com/docs/containers?topic=containers-kube_concepts&locale=en-us
17. Kubectl - run commands
$ kubectl run nginx --image=image --port=80
$ kubectl get pods,deploy
NAME READY STATUS RESTARTS AGE
po/nginx-1423793266-svb16 1/1 Running 1 5h
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
deploy/nginx 1 1 1 1 5h
18. $ kubectl expose deploy/nginx --type=NodePort
$ kubectl get svc
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes 10.0.0.1 <none> 443/TCP 2d
nginx 10.0.0.227 <nodes> 80:31659/TCP 5h
kubectl - expose
22. $ kubectl get pod,svc,deploy
$ kubectl get all -o wide
NAME READY STATUS RESTARTS AGE IP NODE
po/nginx-1423793266-svb16 1/1 Running 1 5h 172.17.0.3 minikube
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
svc/kubernetes 10.0.0.1 <none> 443/TCP 2d <none>
svc/nginx 10.0.0.37 <nodes> 80:32739/TCP 1m run=nginx
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE CONTAINER(S) IMAGE(S) SELECTOR
deploy/nginx 1 1 1 1 5h nginx nginx run=nginx
NAME DESIRED CURRENT READY AGE CONTAINER(S) IMAGE(S) SELECTOR
rs/nginx-1423793266 1 1 1 5h nginx nginx
pod-template-hash=1423793266,run=nginx
kubectl - get
23. $ kubectl get node
$ kubectl get event
$ kubectl get all --all-namespaces
$ kubectl get pod -l component=web
kubectl - get