Deepak Mourya:
Hi, Whenever I use the following command to generate yaml file, Instead of yaml it will store pod create output
kubectl run secret1401 --image=busybox {tried with nginx also) --command – sleep 4800 --dry-run -o yaml > pod.yaml
AB:
kubectl run secret1401 --image=busybox --dry-run -o yaml --command – sleep 4800 > pod.yaml
Command will always go last
Satyawan:
no rule as such in my view
Satyawan:
– before sleep is problem i think
Deepak Mourya:
@AB @Satyawan I have tried this too but it happened all the time, at last used kubectl run pod --image-nginx --dry-run -o yaml > pod,yaml and then add other stuff
Satyawan:
let me send full command =>
Satyawan:
kubectl run secret1401 --image busybox --command sleep 4800 --dry-run=client -o yaml > pod.yml
Satyawan:
i got it u also not using --dry-run=client
Satyawan:
simple --dry-run is deprecated
Satyawan:
@Deepak Mourya
Deepak Mourya:
@Satyawan Yes i have tried --dry-run=client also
Satyawan:
use the command i sent once
Satyawan:
what’s the cluster version ?
Deepak Mourya:
1.19
Satyawan:
That’s strange, working for me
Deepak Mourya:
session got terminate now, i have used the lightening lab
Deepak Mourya:
k run static-busybox --image=busybox --command – sleep 1000 --dry-run=client -o yaml > static.yaml
This also got the same error
Deepak Mourya:
hmm ok i will try again