Public | Automated Build

Last pushed: 7 months ago
Short Description
A simple container that receives metadata as environment variables in a file
Full Description

Kubernetes Node Labels from the environment

A simple container that receives metadata as environment variables in a file that can e.g. be produced by CoreOS' bootcfg.

Run it by dropping the following as kube-env-node-labels.yaml into /etc/kubernetes/manifests:

apiVersion: v1
kind: Pod
metadata:
  name: kube-env-node-labels
  namespace: kube-system
spec:
  hostNetwork: true
  restartPolicy: OnFailure
  containers:
  - name: kube-env-node-labels
    image: docker.io/urzds/kube-env-node-labels:v0.3.1
    env:
    - name: POD_NAME
      valueFrom:
        fieldRef:
          fieldPath: metadata.name
    - name: KENL_CERT_FILE
      value: /etc/kubernetes/ssl/kubelet.crt
    - name: KENL_KEY_FILE
      value: /etc/kubernetes/ssl/kubelet.key
    - name: KENL_CA_CERT_FILE
      value: /etc/kubernetes/ssl/ca.crt
    volumeMounts:
    - mountPath: /etc/kubernetes/ssl
      name: ssl-certs-kubernetes
      readOnly: true
    - mountPath: /metadata.env
      name: metadata
      readOnly: true
  volumes:
  - hostPath:
      path: /etc/kubernetes/ssl
    name: ssl-certs-kubernetes
  - name: metadata
    hostPath:
      path: /run/metadata/bootcfg.env

Internally it uses Alpine Linux with the cURL and jq tools.

Based on eliaslevy/docker-aws-node-labels.

Docker Pull Command
Owner
urzds
Source Repository