Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use local gce metadata server in kubelet #8911

@simon3z

Description

@simon3z

Kubelet / gce provider should access the local metadata server to get the Instance ID of a node.

Reference: #7775 (comment)

    // TODO(roberthbailey): Can we do this without having credentials to talk
    // to the cloud provider?
    externalID, err := instances.ExternalID(kl.hostname)
    if err != nil {
        return nil, fmt.Errorf("failed to get external ID from cloud provider: %v", err)
    }
    node.Spec.ExternalID = externalID
    // TODO: We can't assume that the node has credentials to talk to the
    // cloudprovider from arbitrary nodes. At most, we should talk to a
    // local metadata server here.
    instanceID, err := instances.InstanceID(node.Name)

/cc @bgrant0607 @roberthbailey

Metadata

Metadata

Assignees

Labels

priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.sig/cluster-lifecycleCategorizes an issue or PR as relevant to SIG Cluster Lifecycle.sig/nodeCategorizes an issue or PR as relevant to SIG Node.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions