CKAD-exercises icon indicating copy to clipboard operation
CKAD-exercises copied to clipboard

Use --generator=run-pod/v1 explicitly instead of --restart=Never

Open stankevichevg opened this issue 5 years ago • 7 comments

Use --generator=run-pod/v1 explicitly instead of --restart=Never (not specified in the task)

stankevichevg avatar Nov 23 '19 22:11 stankevichevg

BTW --restart=Never is still relevant, but i agree its better to use generator since its the new way.

shay-berman avatar Nov 25 '19 06:11 shay-berman

Is the --restart=Never deprecated? If not, can we include it in a comment? I think it's easier for people to remember for the exam, but definitely agree that generator is the correct way.

dgkanatsios avatar Dec 06 '19 21:12 dgkanatsios

we should retain --restart=Never

bvntejasvi avatar Jan 12 '20 18:01 bvntejasvi

According to https://kubernetes.io/docs/reference/kubectl/conventions it's still good to use --restart=Never to create pods:

Generators other than run-pod/v1 are deprecated

ojongerius avatar Feb 11 '20 22:02 ojongerius

I suppose we can add it as a comment, in any case.

dgkanatsios avatar Mar 29 '20 00:03 dgkanatsios

Generated shouldn't be use anyways, this was deprecated and will be removed in 1.20 https://kubernetes.io/docs/setup/release/notes/#changelog-since-v1-20-0. This topic also kind of touches with my pull request #167, which depending on the top of pod image we need to set the restart policy or keep the default.

StevenJDH avatar Apr 20 '21 10:04 StevenJDH

@stankevichevg Can you rebase your branch with the latest master and update the PR with reviews if you're still at it?

mjrulesamrat avatar Sep 27 '21 17:09 mjrulesamrat