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: {}