Skip to content
This repository was archived by the owner on Dec 31, 2025. It is now read-only.
This repository was archived by the owner on Dec 31, 2025. It is now read-only.

How to inject variable determined at runtime to nodeadm userdata? #103

@rishabhjain62

Description

@rishabhjain62

Hi,

We need to assign instance life cycle as node label to support some functionality. Earlier with bootstrap.sh this method used to work - --kubelet-extra-args "--node-labels=lifecycle=$(curl -s http://169.254.169.254/latest/meta-data/instance-life-cycle),worker_type=application"

But with nodeadm, I could not find reference to make it work.

`MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="BOUNDARY"

--BOUNDARY
Content-Type: application/node.eks.aws


apiVersion: node.eks.aws/v1alpha1
kind: NodeConfig
spec:
cluster:
name:
apiServerEndpoint:
certificateAuthority:
cidr: 10.1.0.0/16

--BOUNDARY
Content-Type: application/node.eks.aws


apiVersion: node.eks.aws/v1alpha1
kind: NodeConfig
spec:
kubelet:
config:
shutdownGracePeriod: 30s
featureGates:
DisableKubeletCloudCredentialProviders: true
flags:
- --node-labels=lifecycle=$(curl -s http://169.254.169.254/latest/meta-data/instance-life-cycle),worker_type=application

--BOUNDARY--`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions