1. 资源管理方式:
1>. 命令式对象管理∶直接使用命令去操作kubernetes资源
kubectl run nginx-pod --image=nginx:1.17.1 --port=80
2>. 命令式对象配置∶通过命令配置和配置文件去操作kubernetes资源
kubectl create/patch -f nginx-pod.yaml
3>. 声明式对象配置∶通过apply命令和配置文件去操作kubemetes资源
kubectl apply -f nginx-pod.yaml
类型 | 操作对象 | 适用环境 | 优点 | 缺点 |
命令式对象管理 | 对象 | 测试 | 简单 | 只能操作活动对象,无法审计,跟踪 |
命令式对象配置 | 文件 | 开发 | <