Skip to content

20180504_talk_2

20180504_talk_2

What “production ready” does really mean ?

Note: This talk is focused on k8s layer, not provision, not app deployment

1 - Production ready def

Good enought for user to server real-world traffic

Your offering is prod ready whent it exceed what your users expect
- Google def

It is all about tradeoffs

2 - Prod ready factors

  1. Reasonable secure (you can spend a lifetime trying to secure your cluster)
  2. HA enought for the usage
  3. Every components are declaratively controlled
  4. Changes to the cluster state can be safely applied
  5. Cluster pass e2e tests from CNCF

3 - HA

  1. k8s components can fail without causing the cluster to fail
  2. Mahines can fail without causing the cluster to fail

4 - Security

TLS communication everywhere
* Use anexternal PKI provider

API AuthN & AuthZ
* Disable anonymous auth on localhost
* Enforce RBAC and NodeAuthorizers

Kueblet lockdown
* Kueblet should have uniq ID
* Disable readonly, public and cAdvisor ports
-> Should be disabled in 1.11

Dashboard & Helm
* Whitelist explict operations for tiler
* Don’t give cluster-admin to everyones
-> Has auth since 1.7

5 - Deny by default (sec Bestpractices)

Deny by default
* RBAC
* NetworkPolicy
* restrictive PodSecurityPoicy

6 - Kubeadm

HA with Kubeadm
* kubeadm init on each Master node + LB for API servers
* kubeadm join on each Worker node

Tips:
* Hosts admin and controlPlan resources on the masters nodes
* Use Pod anti-affinity
* Prometheus kube-state-metrics
* Define SLI, SLO and SLA

7 - ClusterAPI

Features:
* Upgrade
* Auto-repair
* Cluster autoscale

Recap

  • Pay attention to your need
  • HA != MultiMaster
  • PKI is important
  • Declarative control is better