kubectl run pod-1 --image=busybox --command sleep 10m --dry-run=client --env myvar=myvalue --grace-period=30 --image-pull-policy=IfNotPresent --labels env=dev --limits cpu=20m,memory=200Mi --requests cpu=10m,memory=100Mi --namespace test --output yaml --port 80 --restart=Never --serviceaccount=user
Note: --dry-run=client will work in versions above 1.17, in this demo I had to remove the value 'client' due to the old versions I am using