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

Dec 2021 [Video]: Introduction to Kubernetes by Jonas Felix

Dec 2021 [Video]: Introduction to Kubernetes by Jonas Felix

Video Link: https://www.youtube.com/watch?v=odJOvb7-j0c

Meetup Link: https://www.meetup.com/de-DE/Microsoft-Azure-Zurich-User-Group/events/281820642/

Orchestrating containers with Kubernetes providing applications in a reproducible, efficient and encapsulated manner are central challenges in software projects. In this context, the so-called containerization technology and methodology is crystallizing as a leading solution for modern infrastructure landscapes as well as distributed software architecture. This leads to the topic of orchestration, where Kubernetes has established itself as a quasi-standard, which underlies almost all of today's container platforms. It is therefore not only a matter of packing applications into containers, but also to automatically combine them with the appropriate rules and mechanisms in a suitable composition. How has today's software and system engineering moved into containerization, where do we find it in use, what are the challenges and how is Kubernetes hands on tackling them?

About Jonas:
Jonas Felix has been actively involved in software and system development since the 90s. In the 2000s, he founded and developed one of the first social business networking platforms (similar to LinkedIn), and built a leading software company in its field, which he successfully sold in 2016 as a major shareholder. Since then, he has continued to participate in ventures as an investor, co-founder or strategic advisor. However, his heart is and remains in hands-on development, which is the reason he is also running the software and system engineering course provider letsboot.ch, where he regularly teaches courses.

You can find him at:
https://www.linkedin.com/in/jonas-felix/
https://www.letsboot.ch/kurs/kubernetes-docker-devops?utm_source=azurezurich&utm_medium=talk&utm_campaign=kub21

Azure Zurich User Group

December 07, 2021
Tweet

More Decks by Azure Zurich User Group

Other Decks in Technology

Transcript

  1. letsboot.ch swiss dev training Kubernetes an introduction Talk Speaker 1

    2 3 orchestrates containers kubernetes goals concepts demo refresh basics Jonas Felix Father Soft. & Sys. Engineer Entrepreneur letsboot.ch
  2. letsboot.ch swiss dev training Starting point 1/2 Servers Browser Backend

    (C#) Database(s) Service (Go) Service (Python) Single Page Application user
  3. letsboot.ch swiss dev training Starting point 2/2 browser cloud html,css,js

    single page application webserver backend api search db service2 service1 authentication sql database file db message queue user
  4. letsboot.ch swiss dev training - Provide diverse environments - Run

    consistent on dev, test and production - Release fast and often - Automate everything - Clarify borders: apps vs. infrastructure - Isolate for security & utilisation - Horizontal scaling - Roling updates Challanges to solve
  5. letsboot.ch swiss dev training Refresh: A container is... - Image:

    - a packaged filesystem - instructions how to run it - an isolated group of processes - separate file system view - dependencies, configuration, scripts, binaries - separate network interface - no direct access or visibility to other containers - resource restrictions (cpu, memory...) a process isolated in its own environment by the operating system
  6. letsboot.ch swiss dev training Refresh: Container Process fetch image image

    run source code build image build instructions base image image registry containerd container
  7. letsboot.ch swiss dev training Refresh: Container Demo cd todo-app highlight

    -O ansi Dockerfile docker build -t todo-app . docker run -dp 4000:3000 --name todo todo-app docker top todo pstree -lags 697340 docker exec todo ps aux docker tag todo-app letsboot21/todo-app echo http://$PARTICIPANT_NAME.sk.letsboot.com:4000 docker run -dp 6080:80 --name vdesk dorowu/ubuntu-desktop-lxde-vnc echo http://$PARTICIPANT_NAME.sk.letsboot.com:6080
  8. letsboot.ch swiss dev training Orchestration - run multiple containers (1/3)

    server 1 server 2 server 3 run run run run run run run run run run containerd webserver 1 backend 1 service X 1 containerd db 1 webserver 2 backend 2 containerd backend 3 service X 2 service Y 1 db 2
  9. letsboot.ch swiss dev training Orchestration - connect (2/3) server 1

    server 2 server 3 run run run run run run run run run run containerd webserver 1 backend 1 service X 1 containerd db 1 webserver 2 backend 2 containerd backend 3 service X 2 service Y 1 db 2
  10. server 1 server 2 server 3 run run run run

    run run run run run run traffic traffic traffic traffic containerd webserver 1 backend 1 service X 1 containerd db 1 webserver 2 backend 2 containerd backend 3 service X 2 service Y 1 db 2 ingress / firewall storage
  11. letsboot.ch swiss dev training Orchestration: What do we need? 1.

    A way to define how "everything" should be run (desired state). 2. Something starting "everything" up. 3. Something keeping it running. (ie. restarting a container) 4. Something applying changes. (ie. updating an image)
  12. letsboot.ch swiss dev training Kubernetes state & objects yaml_file control_plane

    etcd node 1 adapts informs manages informs updates state manages object_configurations api controllers kubernetes objects: - known current state - desired state kubelet & k-proxy containerd container kubectl
  13. letsboot.ch swiss dev training Demo Kubernetes kubectl run --image=nginx todo;

    k get pods k describe pod todo # look at events k delete pod todo --wait=false; k get pods kubectl create deployment --image=nginx todo; k get all k describe pod todo # look at Controlled By k describe repliacset todo # look at events k describe deployment todo # look at events k set image deployment todo nginx=nginx:alpine; k get all k get all k create deployment --image=nginx todo -o yaml --dry-run=client > todo- deployment.yaml k run --image=nginx todo -o yaml --dry-run=client > todo-pod.yaml k apply -f todo-deployment.yaml; k get all k get all k create service clusterip todo --tcp=80:80 --dry-run=client -o yaml > todo-service.yaml k port-forward --address 0.0.0.0 service/todo 8080:80 echo http://$PARTICIPANT_NAME.sk.letsboot.com:8080
  14. letsboot.ch swiss dev training Kubernetes Overview k-proxy kubelet sched sched

    sched Control Plane Node etcd Kubernetes cluster api api api c-c-m c-c-m c-c-m c-m c-m c-m Node Node k-proxy kubelet kubelet k-proxy Control plane Scheduler sched Cloud controller manager (optional) c-c-m Controller manager c-m kubelet kubelet kube-proxy k-proxy (persistence store) etcd etcd Node API server api
  15. letsboot.ch swiss dev training Advanced Demo (optional) cd ~/course/project-start/ tree

    --dirsfirst k8s k config set-context aztalk --namespace=default k apply -f k8s -R k get deployments
  16. letsboot.ch swiss dev training - Monitor desired state and react

    - Start and stop containers (by talking to containerd) - "Scale" horizontally - Rolling updates - Schedule based on utilisation "(CPU & Memory) - DNS and network inbetween containers - "request" external resources - Nodes/Servers - Storage - Ingress - ... extendable What does Kubernetes do?
  17. letsboot.ch swiss dev training - Making apps scalable - Making

    apps "roling updateable" - Install or update servers - Start or stop servers - External DNS and Network - Manage storage & backup - Central monitoring & logging - "Install/manage" a production cluster What K8s doesn't do? on it's own You need an underlying infrastructure.
  18. letsboot.ch swiss dev training Process: Container & Orchestration cluster servers...

    integration and delivery software engineering orchestrates fetch image image run kubernetes containerd containers build delivery registry image source code container build instructions base image orchestration
  19. letsboot.ch swiss dev training Demo git add -A git commit

    -m "show me ci cd" git push echo https://gitlab.com/$GIT_REPO/-/pipelines
  20. letsboot.ch swiss dev training Software Engineering - Develop Software &

    Environment - Build and provide images - Build scalable & failure tollerant code - Prepare orchestration System Engineering - Provide Kubernetes Cluster(s) - Integrate infrastrcuture into Kubernetes - Build and manage ecosystem (storage, monitoring...) - ... View System vs. Software Engineering
  21. letsboot.ch swiss dev training Main takeaways - Containers are processes

    isolated by the operating system. - Orchestration: defintion how containers should be run together. - Kubernetes is used to orchestrate containers. - Define your orchestration in manifests (yaml). - K8s is a modular plattform. - Relevant solutions provide integrations to K8s. - Use your orchestration (yaml) on any kubernetes cluster. - Use your orchestration on dev, automated tests and production. Want more? Book a letsboot.ch course!
  22. letsboot.ch swiss dev training Next Meetups about Kubernetes 18.01.2022: Introduction

    to Azure Kubernetes Service (AKS) by Thomas Hafermalz 15.02.2022: Migration from Azure AppService to Azure Kubernetes Service by Marc Merzinger 22.03.2022: You are already running Kubernetes-based workloads on AKS and want to get more out of it? by Nico Meisenzahl Next letsboot.ch/kubernetes course: 23. - 25. March 2022