一 、Pod
Pod 是 kubernetes 基本调度单位。每个 Pod 中可以运 行一个或多个容器,共享 Pod 的文件系统、IP 和网络等 资源,每个 Pod 只有一个 IP。

1. 创建 Pod
声明式文件方式创建 Pod,支持 yaml 和 json

创建 pod

测试访问

2. 更改 Pod 的启动命令及参数

command:覆盖 ENTRYPOINT 的命令
args:覆盖 CMD 的命令
启动并查看 Pod

3. Pod 状态及 Pod 故障排查






注意: Pod 的 Phase 字段只有 Pending、Running、 Succeeded、Failed、Unknown, 其余的为处于上述状 态的原因,可以通过 kubectl get po xxx -o yaml 查看。
4. Pod 镜像拉取策略

查看镜像拉取情况

更改镜像拉取策略为 IfNotPresent
