Where is the kubectl command get executed?

10/15/2019

I want to know where do we usually execute kubectl command ?

Is it on master node or a different node, because i executed kubectl command from one of the EC2 instances in AWS and master and worker node was completely different ( total 3 node = 1 master and 2 worker node).

And when we create cluster ,does that cluster lies in worker node or it includes master node too?

-- Penguin Tech
kubernetes

1 Answer

10/15/2019

The kubectl command itself is a command line utility that always executes locally however all it really does is issue commands against a Kubernetes server via its Kubernetes API

Which Kubernetes server it acts against is determined by the local environment the command is run with. This is configured using a "kubeconfig" file which is is read from the KUBECONFIG environment variable (or defaults to the file in in $HOME/.kube/config). For more information see Configuring Access to Multiple Clusters

-- Yinzara
Source: StackOverflow