kubectl创建模板deployment
kubectl create deploy nginx --image=**nginx:1.14.2** --replicas=3 -oyaml --dry-run=client > nginx-deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: nginx
name: nginx
spec:
replicas: 10
selector:
matchLabels:
app: nginx
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: nginx
spec:
containers:
- image: nginx:1.14.2
name: nginx