k8s help

[root@localhost ~]# kubectl create deployment web01 --image=httpd --port=80 -r 100 -n default --dry-run=client -o yaml

[root@localhost ~]# kubectl create deployment web01 --image=httpd --port=80 -r 100 -n default --dry-run=none -o yaml

[root@localhost ~]# kubectl create deployment web02 --image=httpd --port=80 -r 3  -n default --dry-run=server -o yaml

查看yaml示例帮助信息
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: web01
name: web01
namespace: default
spec:
replicas: 100
selector:
matchLabels:
app: web01
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: web01
spec:
containers:
- image: httpd
name: httpd
ports:
- containerPort: 80
resources: {}
status: {}

posted @ 2023-08-18 14:38  vmsysjack  阅读(6)  评论(0编辑  收藏  举报