Skip to content
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

Read Kubernetes node name from environment #3077

Merged
merged 2 commits into from
Feb 19, 2018
Merged

Read Kubernetes node name from environment #3077

merged 2 commits into from
Feb 19, 2018

Conversation

bboreham
Copy link
Collaborator

@bboreham bboreham commented Feb 19, 2018

If we have the node-name then we can save work requesting the list of local pods from kubelet. And the best way to get the node name is via the "downwards api", i.e. put this in the DaemonSet Yaml:

        - name: KUBERNETES_NODENAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: spec.nodeName

Also drive-by fix of incorrect doc string.

If we have the node-name then we can save work requesting the list of
local pods from kubelet.  And the best way to get the node name is via
the "downwards api", i.e. put this in the Daemonset Yaml:

        - name: KUBERNETES_NODENAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: spec.nodeName
@bboreham bboreham merged commit ba32a40 into master Feb 19, 2018
@bboreham bboreham deleted the nodename-env branch September 13, 2019 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants