2

What is the different between

--dry-run
--dry-run=client
--dry-run=server

opportunities?

And is there any purpose other than create a definition file?

Thank you for your time.

Alidmrc
  • 21
  • 2

1 Answers1

2

Passage from the official Kubernetes kubectl references:

[--dry-run] Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.

The following table should explain it in a much simpler way:

sends data to server/cluster perform change on server/cluster validation by the server/cluster
--dry-run client no no no
--dry-run server yes no yes
--dry-run none yes yes yes
F1ko
  • 3,326
  • 1
  • 9
  • 24
  • @alidmrc please make sure to accept the answer so that others know it indeed provided the necessary information – F1ko Oct 14 '21 at 10:11