-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Find portalIP automatically while updating a service #5907
Comments
Please see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md. PUT doesn't support partial updates. In general, you need to do a GET, change just what you want to update, and then PUT. You could try PATCH, which was recently added. You may also be interested in a new merge strategy being implemented -- see #6027. |
And, yes, the description string on the field should say that the field "cannot be updated" -- @thockin. |
@bgrant0607 - Thanks Brian, I'm not asking to allow |
@hurf Thank you for offering to make a change, but the change will not be accepted. If you just want to update certain fields in the object, please use PATCH. |
I also recommend trying kubectl update --patch: |
The description does say "cannot be updated". |
So it does. |
@thockin @bgrant0607 - Sorry for the description mentioned "can not be updated" and not expressed myself clearly. What I want to say is when I'm creating the pod, I didn't provide the Anyway thanks you can discuss with this issue. |
When I tried to update a service to change its port. Kubectl said
spec.portalIp: invalid error ""
I viewed detailed information of the service and added
portalIp
with the same value as current service in the template and solved the problem.But since the
portalIp
is automatically allocated when the service is created. Why users must provideportalIp
explicitly while updating? And also theportalIp
can not be changed while updating.The text was updated successfully, but these errors were encountered: