Client-go: how to attach label to some node by using client-go

Created on 20 May 2018  路  1Comment  路  Source: kubernetes/client-go

when using clientset.CoreV1().Nodes().Update(node), I found this orrors:
Operation cannot be fulfilled on nodes "node1": the object has been modified; please apply your changes to the latest version and try again.
Ask if anyone can help, thanks.

Most helpful comment

Nodes update their heartbeat timestamp every ~10 seconds, which makes it likely a get/update will hit a conflict error. You can either retry on conflict errors or submit the label addition as a patch request instead (which makes the server retry application of the patch server-side)

>All comments

Nodes update their heartbeat timestamp every ~10 seconds, which makes it likely a get/update will hit a conflict error. You can either retry on conflict errors or submit the label addition as a patch request instead (which makes the server retry application of the patch server-side)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

peterwillcn picture peterwillcn  路  5Comments

jharshman picture jharshman  路  4Comments

jgrobbel picture jgrobbel  路  3Comments

mheese picture mheese  路  5Comments

AdheipSingh picture AdheipSingh  路  5Comments