# Main Architecture

## Structure

A K8S cluster is consist of master node(s) and worker node(s). All nodes are networking connected and could talk to each other.

![](https://4165656130-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lb7SAstgE6Ae0BisAes%2F-Lf3CFAUxyKskY6YXNPW%2F-Lf3DWnRrl95F_9Uxqxh%2FScreen%20Shot%202019-05-16%20at%2010.12.04%20PM.png?alt=media\&token=ecb28713-6cd6-4a86-a962-054c8322bca5)

{% hint style="info" %}
DNS server is also part of master server which is not shown in the diagram above
{% endhint %}

**Master node: etcd**, **Controller Manager**, **Scheduler** and **API** **Server** are running on it. You will the corresponding Linux processes are running on the master node.

![etcd](https://4165656130-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lb7SAstgE6Ae0BisAes%2F-Le-51-o1f_DTaAD_N_V%2F-Le-7_tclrFwj28sSmg8%2FScreen%20Shot%202019-05-03%20at%204.58.04%20PM.png?alt=media\&token=a60bdc2a-8d57-4cb2-a8bb-11e2463b4bd6)

![controller manager](https://4165656130-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lb7SAstgE6Ae0BisAes%2F-Le-51-o1f_DTaAD_N_V%2F-Le-7n2WkaGW4VcSyNYc%2FScreen%20Shot%202019-05-03%20at%204.59.00%20PM.png?alt=media\&token=90482f3e-3b1c-443c-b27d-c076803765fa)

![scheduler](https://4165656130-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lb7SAstgE6Ae0BisAes%2F-Le-51-o1f_DTaAD_N_V%2F-Le-84QXEoO58rC1iX5L%2FScreen%20Shot%202019-05-03%20at%204.59.58%20PM.png?alt=media\&token=268067b4-1068-4c2d-9fa0-4ecc2002a8e0)

![API Server](https://4165656130-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lb7SAstgE6Ae0BisAes%2F-Le-51-o1f_DTaAD_N_V%2F-Le-8HU8y-iIQVNCV_2w%2FScreen%20Shot%202019-05-03%20at%205.01.09%20PM.png?alt=media\&token=7a468162-687c-4735-8f18-1a952a57ae0b)

{% hint style="warning" %}
From v1.14 **cloud-controller-manager** was added. So we have kube-controller manager and cloud-controller-manager as the controller manager
{% endhint %}

**Worker node: kubelet** is running on it

![](https://4165656130-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lb7SAstgE6Ae0BisAes%2F-Le-51-o1f_DTaAD_N_V%2F-Le-8p56lP0O9fFyDStK%2FScreen%20Shot%202019-05-03%20at%205.03.31%20PM.png?alt=media\&token=2088e108-87ba-4edd-94a1-524f83cda322)

{% hint style="info" %}
On worker node, there could be **kube-proxy** as well
{% endhint %}

## Command line tools

All components mentioned above have corresponding executable binaries which are packaged  each node. The locations of those binaries are different based on how you install the K8S cluster. In PKS, the K8S binaries are under `/var/vcap/packages` . And etcd is only on master node.

So, if you want to play with those command line tools, you could go to your K8s node check out the binary location and run it for fun.

![](https://4165656130-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lb7SAstgE6Ae0BisAes%2F-Le-9QFp_DZxtpI1KUC6%2F-Le-BmxmR8F8NxhxjFpg%2FScreen%20Shot%202019-05-03%20at%205.16.29%20PM.png?alt=media\&token=814b20a7-3336-4e79-be23-89af962267d1)

Official doc about those command line tools could be found [here](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/).
