Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kubernetes für .NET-Anwendungsentwickler

Kubernetes für .NET-Anwendungsentwickler

Sie möchten Ihre .NET-Anwendung in Kubernetes betreiben und lernen, wie Sie das Potential des Containerorchestrators nutzen können? Dann besuchen Sie diesen Talk von Kubernetes- und Cloud-Native-Experte Thorsten Hans. Sie werden nicht nur den praktischen Umgang mit Kubernetes aus Sicht der Entwickler:innen lernen, sondern auch, wie Sie Patterns und Praktiken nutzen, um Ihre .NET-Anwendungen optimal in Containern zu betreiben. Wie immer ist der Talk gespickt mit vielen Tipps und Demos.

6848c06ef647ab606c668cc5264c0fc9?s=128

Thorsten Hans

September 22, 2021
Tweet

Transcript

  1. Kubernetes für .NET-Entwickler Thorsten Hans @ThorstenHans Consultant

  2. Consultant @ Thinktecture #Azure #Kubernetes #CloudNative #Terraform thorsten.hans@thinktecture.com thinktecture.com thorsten-hans.com

    @ThorstenHans Thorsten Hans
  3. Talking Points What is Kubernetes Azure Kubernetes Service Patterns and

    Practices
  4. Open-Source Container Orchestrator § Initially founded by Google § Cloud

    Native Computing Foundation (CNCF) maintains and manages Kubernetes § Written in go § Kubernetes is Cloud-Agnostic Kubernetes
  5. Open-Source Container Orchestrator § Runs containerized workloads § Takes care

    about networking & isolation of workloads § Abstracts away hardware internas from developers § Container Lifecycle Management Kubernetes
  6. Cluster Infrastructure Kubernetes Kubernetes Control Plane Kubernetes Node Pool Kubernetes

    Worker Node Kubernetes Worker Node
  7. Cluster Infrastructure Kubernetes Kubernetes Control Plane Kubernetes Node Pool Kubernetes

    Worker Node Kubernetes Worker Node Kubernetes Node Pool Kubernetes Worker Node Kubernetes Worker Node
  8. Cluster Infrastructure Kubernetes Kubernetes Control Plane Kubernetes Node Pool Kubernetes

    Worker Node Kubernetes Worker Node Kubernetes Node Pool Kubernetes Worker Node Kubernetes Worker Node
  9. Cluster Infrastructure Kubernetes Kubernetes Control Plane Kubernetes Node Pool Kubernetes

    Worker Node Kubernetes Worker Node Kubernetes Node Pool Kubernetes Worker Node Kubernetes Worker Node Azure Container Instances (ACI)
  10. What runs on a Kubernetes Master § Cluster control-plane §

    Set of control services § etcd based storage § Requires 3 instances to become HA § Executing five essential components Kubernetes Kubernetes Master etcd API Server Scheduler Cloud Controller Manager Controller Manager
  11. What is a Kubernetes Worker-Node § Physical or virtual machine

    § Responsible for running containers in Pods § Consists of at least three main components Kubernetes Kubernetes Worker-Node Container Runtime kubelet kube-proxy
  12. Talking Points What is Kubernetes Azure Kubernetes Service Patterns and

    Practices
  13. AKS § Fully managed Kubernetes as a Service § Easy

    cluster administration (scaling, mutating, or upgrading k8s) § Seamless integration with other Azure services § Cost efficient – you pay just for your Worker-Nodes § Control Plane is operated by Azure itself § Support for reserved instances 💸 Azure Kubernetes Service
  14. Build cloud-native applications § Kubernetes Load-Balancer will spin up an

    Azure Load-Balancer § Mount Azure Files Shares and Disks as Volumes § Consume Docker Images from Azure Container Registry § Use other Azure Services like Redis or Azure SQL § Get Container Insights using Azure Monitor § Hardening using Azure Policy, OPA, and Azure Security Center AKS and Azure Integration
  15. Talking Points What is Kubernetes Azure Kubernetes Service Patterns and

    Practices
  16. § Use Deployments to run stateless APIs § Use StatefulSets

    to run stateful apps § Use CronJobs to run apps on a schedule § Use Jobs to to run on-demand activities Patterns & Practices
  17. § Don’t write to local filesystem § Use Mounted Volumes

    instead § Load Configuration data from the cluster § Environment Variables § Single key per file configs § Implement Health Probes § Readiness – tell Kubernetes that your component bootstrapped correctly § Liveness – tell Kubernetes that your component is still alive Patterns & Practices
  18. § Configure HTTPS is NOT in the responsibility of an

    app § Kubernetes handles that § Expose metrics for Prometheus § https://github.com/prometheus-net/prometheus-net § Enable metric scraping using https://aka.ms/container-azm-ms-agentconfig § Log to SDTOUT and STDERR § If not possible log, consider adding a Sidecar container Patterns & Practices
  19. .NET applications in Kubernetes - Implement patterns and practices in

    .NET - Containerize and Deploy your .NET application to Kubernetes - Verify platform integration - Scale horizontally - Debug with ease Demo
  20. • Use Kubernetes Namespaces for isolation and grouping • Always

    specify resource requests and limits • Always add health checks • Liveness- and Readiness-Probes • Establish strategies for labels and annotations • Follow the single responsibility principle (a single container does one thing) Embrace Kubernetes and transform towards cloud-native
  21. Q&A If you have further questions: shoot me a mail

    at thorsten.hans@thinktecture.com / thorsten.hans@gmail.com or tweet at @ThorstenHans