Jess
Jess

Reputation: 3725

What is tag "eksctl.cluster.k8s.io/v1alpha1/cluster-name" for?

In tutorial of AWS EKS, for adding secondary CIDRs to the new VPC, We should add following tags to the new subnets

  1. eksctl.cluster.k8s.io/v1alpha1/cluster-name
  2. kubernetes.io/cluster/eksworkshop-eksctl
  3. kubernetes.io/role/elb

I know tag2 and tag3 are for discovery by load balancers or ingress from this site, but What is tag1 "eksctl.cluster.k8s.io/v1alpha1/cluster-name" for?

Upvotes: 1

Views: 337

Answers (1)

bells17
bells17

Reputation: 380

Apparently this tag shows the cluster name.
The tag name is defined below:
https://github.com/eksctl-io/eksctl/blob/release-0.25/pkg/apis/eksctl.io/v1alpha5/types.go#L171-L172.

And for example, the defined constant is used by the function of getting a cluster name.
https://github.com/eksctl-io/eksctl/blob/release-0.25/pkg/cfn/manager/cluster.go#L189-L209

So maybe the eksctl judge a cluster name from an "eksctl.cluster.k8s.io/v1alpha1/cluster-name" tag.

Upvotes: 2

Related Questions