mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
fix panic in kubelet
This commit is contained in:
parent
7f9f847ce9
commit
04b876e63c
@ -445,6 +445,9 @@ func (kl *Kubelet) setNodeAddress(node *v1.Node) error {
|
||||
|
||||
if kl.externalCloudProvider {
|
||||
if kl.nodeIP != nil {
|
||||
if node.ObjectMeta.Annotations == nil {
|
||||
node.ObjectMeta.Annotations = make(map[string]string)
|
||||
}
|
||||
node.ObjectMeta.Annotations[kubeletapis.AnnotationProvidedIPAddr] = kl.nodeIP.String()
|
||||
}
|
||||
// We rely on the external cloud provider to supply the addresses.
|
||||
|
Loading…
Reference in New Issue
Block a user