Bringing Security and Multi- tenancy to Kubernetes
Lei (Harry) Zhang
Bringing Security and Multi- tenancy to Kubernetes Lei (Harry) - - PowerPoint PPT Presentation
Bringing Security and Multi- tenancy to Kubernetes Lei (Harry) Zhang About Me Lei (Harry) Zhang @resouer #CNCF member, #Microsoft MVP Previous: VMware, Baidu Feature Maintainer of Kubernetes HyperCrew: https://hyper.sh/
Lei (Harry) Zhang
dream reality
your running process
dependencies, files and directories
namespace cgroups
FROM busybox ADD temp.txt / VOLUME /data CMD [“echo hello"] Read-Write Layer & /data “echo hello”
read-only layer
/bin /dev /etc /home /lib / lib64 /media /mnt /opt /proc / root /run /sbin /sys /tmp / usr /var /data /temp.txt
/etc/hosts /etc/hostname /etc/resolv.conf
read-write layer
/ t e m p . t x t
json
json
init layer
FROM busybox ADD temp.txt / VOLUME /data CMD [“echo hello"]
Docker Container
Secure Kubernetes from runtime level
See: http://hypercontainer.io/why-hyper.html
sequence before the pod's normal containers are started.
perform computation prior to the app containers.
Pod log app infra container volume init container
C
Foo
Kubernetes with HyperContainer Runtime
kubelet
SyncLoop
controller-manager
ControlLoop
kubelet
SyncLoop
proxy proxy
network pod replica namespace service job deployment volume petset …
etcd
scheduler
api-server
Desired World Real World
Call Neutron to create/delete network
Namespaces
reach each other directly through IP
network setup
kubelet
SyncLoop
kubelet
SyncLoop
proxy proxy
1 Pod created
etcd
scheduler
api-server
kubelet
SyncLoop
kubelet
SyncLoop
proxy proxy
2 Pod object added
etcd
scheduler
api-server
kubelet
SyncLoop
kubelet
SyncLoop
proxy proxy
3.1 New pod object detected 3.2 Bind pod with node
etcd
scheduler
api-server
kubelet
SyncLoop
kubelet
SyncLoop
proxy proxy
4.1 Detected pod bind with me 4.2 Start containers in pod
etcd
scheduler
api-server
InitNetworkPlugin Choose Runtime docker, rkt, hyper/remote InitNetworkPlugin
HandlePods {Add, Update, Remove, Delete, …}
NodeStatus Network Status status Manager PLEG
SyncLoop
Pod Update Worker (e.g.ADD)
volume Manager
PodUpdate
image Manager
A standalone gRPC daemon
$ iptables-save | grep my-service
portal 10.10.0.116:8001 random mode rules backend rule_1 backend rule_2 172.17.0.2.:80 172.17.0.3.:80
OnServiceUpdate OnEndpointsUpdate
networks
Host path Cinder volume plugin Pod Pod
mountPath mountPath
attach mount
Volume Manager
desired World reconcile
desiredStateOfWorld
attached
in mountedVolume
detached/unmounted
management
Host vol Enhanced Cinder volume plugin Pod Pod
mountPath mountPath
attach vol
desired World reconcile
Volume Manager
volumeID
Node Node
Node kubestack Neutron L2 Agent kube-proxy kubelet Cinder Plugin Pod Pod Pod Pod KeyStone Neutron Cinder Master Object: Network Ceph Object: Pod Object: …
Lei (Harry) Zhang @resouer