When I execute kubectl create deployment nginx --image nginx --dry-run=client -o yaml
it does not have options --port
or --containerPort
. My yaml is:
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: nginx
name: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: nginx
spec:
containers:
- image: nginx
name: nginx
resources: {}
status: {}
Is there a way to generate yaml with the containerPort
option?