Andy Repton
Mission Critical Engineer, Speaker at meetups and conferences, focusing on Cloud Native technologies
Andy Repton, Mission Critical Engineer @ Schuberg Philis
@SethKarlo
arepton@schubergphilis.com
Controller | Purpose |
---|---|
NamespaceLifecycle | Can't delete default, kube-system, kube-public. Can't create in Terminating namespaces. |
LimitRanger | Enforces LimitRanges inside the cluster. |
ServiceAccount | Enables automation of ServiceAccounts. |
DefaultStorageClass | Allows users to not have to specify a StorageClass for PvCs. |
DefaultTolerationSeconds | Sets the default toleration to 5 mins if not set for pods. |
MutatingAdmissionWebhook | Enables calling of a mutating webhook for new requests |
ValidatingAdmissionWebhook | Enables calling of a validating webhook for new requests |
Priority | Enforces the use of priority for new pods |
ResourceQuota | Enforces ResourceQuotas inside the cluster. |
kube-apiserver --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,Priority,ResourceQuota
Note: all of these are default, but v1.13 also adds PersistentVolumeClaimResize to the default
Pretty much every Kubernetes admin on Dec. 3rd
Option 1: disable anonymous-auth on the kube-apiserver. The default is true:
Option 2: ACL your ApiServer
Option 3 (the best): Upgrade!
For example, creating a pod:
Option 1: disable anonymous-auth on the kubelet. Once again, the default is true:
Option 2: Add authentication and authorization to your kubelets using either Certs or Tokens by following the steps here: https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet-authentication-authorization/
Come on WiFi and Demo Gods, don't let me down now
Option 1: disallow your users to use exec, attach etc. privileges
Option 2: upgrade ASAP!
Yes, I'm crazy enough to attempt 4 demos in 45 minutes
Ensure that your nodes are created with read only permissions to your cloud provider
Review your permissions! If someone accidentally downloaded a docker image with this kind of code inside it you could face a hefty bill
Thanks and acknowledgments for great writing, examples and write ups which helped me make the demos:
By Andy Repton
Exploits in Kubernetes and how to fix them
Mission Critical Engineer, Speaker at meetups and conferences, focusing on Cloud Native technologies