cristi
cristi

Reputation: 2199

What is the purpose of cluster-name parameter from kubernetes controller_manager?

So the question is in the title.

I'm wondering what is the purpose of cluster-name parameter from kubernetes controller_manager?

Upvotes: 0

Views: 607

Answers (2)

pagid
pagid

Reputation: 13867

Reading the code of the cluster manager you'll find that the cluster-name is passed down to the service controller and the persistent volume controller which then pass them down to their related objects (Load balancers, persistent volumes, ...).

In both cases these pass down the cluster name to the related cloud provider (see interface) which could use it within the naming of their provider specific objects. This makes sense in case you run more than one Kubernetes cluster side by side on the same provider.

The GCE and AWS cloud providers do this for example, some others don't.

So having two clusters with the same cluster name configuration for the controller manager could therefore cause issues due to name collisions within the objects created by the cloud provider.

Upvotes: 1

JamStar
JamStar

Reputation: 361

lets you create more than one cluster and helps you distinguish between them. Most folks just use kubernetes (which is the default) When you setup your kubectl you provide it as well.

this is from the k8s site @ https://kubernetes.io/docs/getting-started-guides/scratch/

You should pick a name for your cluster. Pick a short name for each cluster which is unique from future cluster names. This will be used in several ways:

  • by kubectl to distinguish between various clusters you have access to. You will probably want a second one sometime later, such as for testing new Kubernetes releases, running in a different region of the world, etc.
  • Kubernetes clusters can create cloud provider resources (e.g. AWS ELBs) and different clusters need to distinguish which resources each created. Call this CLUSTER_NAME

Upvotes: 1

Related Questions