Tag Kubernetes nodes using the Terraform provider

I'm creating a LKE cluster using the latest Linode Terraform provider. I'm using the linode_lke_cluster resource and the tag attribute to tag the creation of LKE clusters appropriate to my business use. For example:

module "linode_k8s_customer_1" {
  source = "./linode_k8s"

  tags = ["customer_1","terraform"]
  pool = {
    type = "g6-nanode-1"
    count = 3
  }
}

However that merely tags the kubernetes cluster that you see under https://cloud.linode.com/kubernetes/clusters . Any of the nodes that are created remain untagged, so I have a jumble of untagged k8s nodes under https://cloud.linode.com/linodes

Is there a way to cause the kubernetes nodes to be tagged when creating a LKE cluster via Terraform?

1 Reply

Linode Staff

Hey there -

At this time, adding tags to individual Linodes isn't something that's supported through linode_lke_cluster - but I have passed along your desire to see this to the team.

You can, however, tag the Linodes once they're created right through the Cloud Manager. I'm going to link you to our guide which shows you exactly how:

Tagging an Existing Linode

I hope that helps you out. For a full list of arguments that are supported check out this page:

Linode/Terraform

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct