Is it possible to run Kubernetes nodes on hosts that can be physically compromised?

7/17/2018

Currently I am working on a project where we have a single trusted master server, and multiple untrusted (physically in an unsecured location) hosts (which are all replicas of each other in different physical locations).

We are using Ansible to automate the setup and configuration management however I am very unimpressed in how big of a gap we have in our development and testing environments, and production environment, as well as the general complexity we have in configuration of the network as well as containers themselves.

I'm curious if Kubernetes would be a good option for orchestrating this? Basically, multiple unique copies of the same pod(s) on all untrusted hosts must be kept running, and communication should be restricted between the hosts, and only allowed between specific containers in the same host and specific containers between the hosts and the main server.

-- kittydoor
docker
kubernetes

1 Answer

7/17/2018

There's a little bit of a lack of info here. I'm going to make the following assumptions:

  • K8s nodes are untrusted
  • K8s masters are trusted
  • K8s nodes cannot communicate with each other
  • Containers on the same host can communicate with each other

Kubernetes operates on the model that:

  • all containers can communicate with all other containers without NAT
  • all nodes can communicate with all containers (and vice-versa) without NAT
  • the IP that a container sees itself as is the same IP that others see it as

Bearing this in mind, you're going to have some difficulty here doing what you want.

If you can change your physical network requirements, and ensure that all nodes can communicate with each other, you might be able to use Calico's Network Policy to segregate access at the pod level, but that depends entirely on your flexibility.

-- jaxxstorm
Source: StackOverflow