-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to update or patch a k8s resource ? #2701
Comments
PatchingWe support full resource patching like this: client.pods().inNamespace(namespace).withName(podName).patch(updatedPod); We do have plans to support Strategic merge/JSON patches in upcoming releases(#2645) UpdateUpdating can be done something like this: client.pods().inNamespace("default").withName("foo")
.edit()
.editMetadata().addToAnnotations("new", "update").endMetadata()
.done(); Note: This has been changed in 5.x versions of client, See Migration guide |
Thanks! @rohanKanojia |
|
|
+ Allow option to configure PatchType in patch operation + Use MediaType in PatchType enum + Add merge-patch+json example
+ Allow option to configure PatchType in patch operation + Use MediaType in PatchType enum + Add merge-patch+json example
+ Allow option to configure PatchType in patch operation + Use MediaType in PatchType enum + Add merge-patch+json example
How to update or patch a k8s resource ? For example, pod or service , etc.
The text was updated successfully, but these errors were encountered: