Kubernetes Namespaces Offer No Isolation 1709616779
Kubernetes Namespaces Offer No Isolation 1709616779
POD4 POD5
192.168.0.1
The Kubernetes network should always satisfy two
requirements:
Pod (10.0.0.1)
to: Notice how the first requirement already invalidates the idea
Namespaces grows
Namespaces are just labels and don't define how many with the resources.
resources can be created or assigned.
POD4 POD5
POD7 POD6
Queue
PreScore
score nodes from
Scheduling
Normalise score
(Notifier)
PreBind
Binding
Binding phase
And why should it?
Bind
PostBind
PODS DEPLOYMENT PODS DEPLOYMENT
UID CLUSTER ROLE read write read write UID ROLE read write read write
1 admin1
1 teamA
2 debug
2 QA
3 reviewer DEV namespace
oleBinding
But you also have Roles that are
RoleBinding restricted by it.
Identity1 Identity2
Normal user Service Account
Mutation
EXTERNAL
webhoo Validation
Mutation webhook
webhook Validation
webhook
External APIs Mutation
k Validation
webhook webhook
INTERNAL
API Aggregation
Resource handlers
Schema validation
Authentication
Authorisation
Mutation Validation
admission admission
controllers controllers
Schema validation
Authentication
Authorisation
Mutation Validation
CertificateSigning admission admission
controllers controllers
CertificateSubjectRestriction
LimitRanger
NamespaceLifecycle So, what happens when you want to
limit the resources in a namespace?
Authorisation
Mutation Validation
admission admission
controllers controllers
LimitRanger This!
As for the ResourceQuota, those NamespaceLifecycle
values aren't enforced by the
scheduler, but the validating and PersistentVolumeClaimResize
mutating admission controllers still
inspects and mutates the values. ResourceQuota
RuntimeClass
NETWORK POLICIES default
NAMESPACE
Pod 1 Pod 3
Pod 2
CoreDNS
Overloading the
DNS server 10.0.2.1
Pod 1
Namespaces are not designed for multi-
tenancy, and it shows when you focus on
shared Kubernetes components such as
CoreDNS.
Pod
Pod AA
Pod
Pod A Pod
A A
1 Soft multi-tenancy
Hierarchical Namespace controller, Capsule
3 Hard multi-tenancy
Karmada
Namespaces are a great building block The community has developed several
for building higher abstractions in tools to build more robust abstractions
Kubernetes.
Kubernetes namespaces
offer no isolation
and how to work around it!
7th of Mar Access cloud resources Application credentials
Service account
CoreDNS