Depolment
配置
大多数的情况下都是编写 yaml
文件来实现
举个例子
apiVersion: apps/v1 #创建对象是用 Kubernetes api的版本
kind: Deploment #想要创建的类型 这里是deploment 里面可以再细分 Pod等
metadata: #标识唯一表示对象的数据
name: nginx-deploment
#uid: 可选
namespace: front #命名空间,用于隔离服务
spec: #期望对象的状态
selector:
marthLables:
app: nignx
replicas: 2
template:
metadata:
labels:
app:nginx
spec:
containers:
- name: nginx
images: nginx
prots:
- containersPort: 80
作者:admin 创建时间:2022-05-28 11:52
最后编辑:admin 更新时间:2022-05-28 12:01
最后编辑:admin 更新时间:2022-05-28 12:01