10 kube commandments we ve been in the game for years
play

10 Kube Commandments We've been in the game for years That in - PowerPoint PPT Presentation

10 Kube Commandments We've been in the game for years That in itself is admirable There's rules to this biz We wrote y'all a manual A step-by-step conf talk for you to get... Your clusters on track And not your releases pushed back Bryan


  1. 10 Kube Commandments

  2. We've been in the game for years

  3. That in itself is admirable

  4. There's rules to this biz

  5. We wrote y'all a manual

  6. A step-by-step conf talk for you to get...

  7. Your clusters on track

  8. And not your releases pushed back

  9. Bryan Liles Staff Software Engineer Heptio Lots of years Years of Experience @bryanl

  10. Carlos Amedee Senior Software Engineer DigitalOcean Observability Cloud Compute Services Systems Engineering @cagedmantis

  11. Rule Number Uno To go fast, you must start slow

  12. Rule Number Uno To go fast, you must start deliberately

  13. Public Cloud Datacenter Your Desktop

  14. Public Cloud Datacenter Your Desktop • GKE on Google Cloud • Minikube • kubeadm • AKS on Azure • Minik8s • *lots of vendors* • *lots of vendors* • Docker for Mac or Windows

  15. Not Declarative Public Cloud Datacenter X X • GKE on Google Cloud • kubeadm • AKS on Azure • *lots of vendors* • *lots of vendors*

  16. Cluster API

  17. Number Two Always let them know your next move

  18. Your next move is the images you'll deploy to your cluster

  19. Build Image Host Image

  20. docker build

  21. docker build • buildah • img • GCP Container Builder

  22. Why are you still building your containers with root privileges?

  23. Rule Number Three Never trust nobody: Hookup up that Pod Security Policy

  24. apiVersion: extensions/v1beta1 kind: PodSecurityPolicy metadata: name: how-not-to-get-robbed spec: privileged: false runAsUser: rule: MustRunAsNonRoot seLinux: rule: RunAsAny fsGroup: rule: RunAsAny supplementalGroups: rule: RunAsAny volumes: - nfs

  25. Number Four I know you heard this before: Never get high off what Kube supplies

  26. Custom Resource Definition Custom CRD Controller

  27. Custom Resources Pattern K8s External Resource Custom CRD Controller Native Resource

  28. Custom Resources Pattern Custom CRD Operator Controller

  29. Custom Resources Pattern Native Resource Native Custom CRD Resource Controller Native Resource

  30. Rule Number Five Communicating With Pods Never Mix Internal and External Traffic

  31. Ingress Tra ffi c

  32. Cluster IP apiVersion: v1 Proxy kind: Service metadata: name: sample-service spec: selector: app: sample-app Service type: ClusterIP ports: - name: http port: 80 targetPort: 80 protocol: TCP Pod Pod Pod

  33. Node Port Service apiVersion: v1 kind: Service metadata: name: my-nodeport-service spec: Pod Pod Pod Pod selector: app: my-app type: NodePort ports: - name: http port: 80 targetPort: 80 nodePort: 30036 protocol: TCP

  34. Load Balancer Load Balancer apiVersion: v1 kind: Service metadata: name: sample-lb Service spec: selector: app: some-app type: LoadBalancer ports: - name: http port: 80 Pod Pod Pod targetPort: 80 protocol: TCP

  35. Ingress apiVersion: extensions/v1beta1 Ingress kind: Ingress metadata: name: my-ingress spec: backend: serviceName: other Service Service servicePort: 8080 rules: - host: foo.mydomain.com http: paths: - backend: serviceName: foo Pod Pod Pod Pod Pod Pod servicePort: 8080 - host: mydomain.com http: paths: - path: /bar/* backend: serviceName: bar servicePort: 8080

  36. Egress Tra ffi c

  37. Egress apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: sample-network-policy spec: podSelector: matchLabels: role: my-app policyTypes: - Egress egress: - to: - ipBlock: cidr: 10.0.0.0/24

  38. Service Mesh

  39. Rule Number Six If You Think You Know What’s Happening In Your Cluster… Forget it.

  40. Observability What’s happening in your cluster?

  41. What’s happening on your cluster?

  42. Metrics and Alerting

  43. Logging

  44. Distributed Tracing

  45. Observability Dashboard

  46. Horizontal Pod Autoscaler

  47. Rule Number Seven Keep your storage and the business rules to manage it completely separated.

  48. Storage

  49. Easily create your own storage implementation

  50. Persistent Volume Snapshots

  51. Number 8: Using Tools

  52. Package Configuration Management Management

  53. Package Management • Helm 2 • Bounds of YAML

  54. Configuration Management • ksonnet • Pulumi • Ballerina

  55. Other types of tools? • ska ff old • kustomize

  56. Number 9: Extending Kubernetes

  57. What happens if you get an API for free?

  58. What happens when you outgrow the Kubernetes API?

  59. Number 10: A live word called refinement -- Building On Kubernetes

  60. App 1 App 2 App 3 Cluster "On top of Kubernetes"

  61. App 1 App 2 App 3 Cluster "On Kubernetes"

  62. Follow these rules

  63. You'll have mad bread to break up

  64. If not, 24 hours of on-call with constant wake ups.

Recommend


More recommend