Will the master know the data on workers/nodes in k8s

11/26/2018

I try to deploy a set of k8s on the cloud, there are two options:the masters are in trust to the cloud provider or maintained by myself. so i wonder about that if the masters in trust will leak the data on workers? Shortly, will the master know the data on workers/nodes?

-- touchingsoil
kubernetes

2 Answers

11/26/2018

Short answer: yes the control plane can access all of your data.

Longer and more realistic answer: probably don't worry about it. It is far more likely that any successful attack against the control plane would be just as successful as if you were running it yourself. The exact internal details of GKE/AKS/EKS are a bit fuzzy, but all three providers have a lot of experience running multi-tenant systems and it wouldn't be negligent to trust that they have enough protections in place against lateral escalations between tenants on the control plane.

-- coderanger
Source: StackOverflow

11/26/2018

The abstractions in Kubernetes are very well defined with clear boundaries. You have to understand the concept of Volumes first. As defined here,

A Kubernetes volume is essentially a directory accessible to all containers running in a pod. In contrast to the container-local filesystem, the data in volumes is preserved across container restarts.

Volumes are attached to the containers in a pod and There are several types of volumes

You can see the layers of abstraction sourceThe layers of abstraction

Master to Cluster communication

There are two primary communication paths from the master (apiserver) to the cluster. The first is from the apiserver to the kubelet process which runs on each node in the cluster. The second is from the apiserver to any node, pod, or service through the apiserver’s proxy functionality.

Also, you should check the CCM - The cloud controller manager (CCM) concept (not to be confused with the binary) was originally created to allow cloud specific vendor code and the Kubernetes core to evolve independent of one another. The cloud controller manager runs alongside other master components such as the Kubernetes controller manager, the API server, and scheduler. It can also be started as a Kubernetes addon, in which case it runs on top of Kubernetes.

Hope this answers all your questions related to Master accessing the data on Workers.

If you are still looking for more secure ways, check 11 Ways (Not) to Get Hacked

-- Vidyasagar Machupalli
Source: StackOverflow