Leia antes:
Comando:
kubectl run nginx-yaml --image=nginx --restart=Never --dry-run=client -n laboratorio -o yaml > pod.yaml
Teste:
cat pod.yaml
Resultado:
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: nginx-yaml
name: nginx-yaml
namespace: laboratorio
spec:
containers:
- image: nginx
name: nginx-yaml
resources: {}
dnsPolicy: ClusterFirst
restartPolicy: Never
status: {}