01 - Core Concepts - Pods
學習目標
- Pods
- ReplicaSets
- Deployments
- Namespaces
- Services
- Imperative Commands
Pods
$ kubectl get pods
$ kubectl get pod <pod-name> Look for existing Pods.
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
newpod 1 /1 Running 0 10m
webapp 1 /2 ImagePullBackOff 0 2m49s
READY ➜ Running Containers in Pod /Total Containers in Pod
$ kubectl get pods -o wide
$ kubectl get pods -A -ns
$ kubectl describe pods
$ kubectl describe pod <pod-name>
Get detailed information about most of the Kubernetes primitives, including Nodes, Pods, and Deployments.
- View what containers are inside that Pod
- View what images are used to build those containers
- Details about the Pod’s container: IP address, the ports used and a list of events related to the lifecycle of the Pod.
$ kubectl run nginx --image=nginx
$ kubectl run redis --image redis
Start a nginx/redis pod.Delete a pod.




留言
張貼留言