Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Kubexperience intro session

180 views

Published on

Kubernetes is much more than just a container orchestration platform … alongside The Cloud Native Landscape Kubernetes is the equivalent to Linux's kernel with an ecosystem of apps/util which enrich it.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Kubexperience intro session

  1. 1. Haggai Philip Zagury | Tikal Knowledge Kubexperience Sharing our Experience with K8s The pla>orm for developers
  2. 2. Who we are ? - Full Stack ! Backend Promotions only work as well as the marketing. DevOps Kubernetes, SRE, I.A.C Frontend React, Node.js Mobile Android, Cross Platform
  3. 3. OPS Operations Background CM/CI/CD ~10 years practicing CI/CD Docker Swarm Making CI flexible Kubernetes Take all you know to k8s KubeExperience This is literally all I do 70% of the time ;) Group & Tech Lead 11+ years @ Configuration Management Continuous Integration Continuous Delivery & Deployment Kubernetes Monitoring 2008 Haggai Philip Zagury
  4. 4. What What is it ? Why Do you need it ? Today’s Goals Explain how we think you should prepare yourselves for the era of distributed systems development How Methodology
  5. 5. Tikal Academy Our in & out strategy
  6. 6. Why do we kubexperience? Why Do we do it ? The why!
  7. 7. Open Source1 Roadmap2 Let’s talk about our Values What makes us tick
  8. 8. The Bigger Picture of so,ware development Containers Universal packaging unit Production Anywhere Runtime Any OS Code Any Language
  9. 9. Production Environment Evolution Server-Rack Unix, Linux Windows, Solaris Virtualization Docker Kubernetes Cloud OS The cloud Public | Private | Multi | Poly
  10. 10. Kubernetes - The OS of the Cloud
  11. 11. Why call it that ? What Is Kubexperience ? kubexperience !
  12. 12. What we wanted to say Anat Zayit, Head of FullStack Community • kubernetes you must know it • kubernetes for developers • OperaZng Kubernetes • kuberentes for microservices Assaf Gannon, Frontend GL
  13. 13. What we wanted to say • kubernetes you must know it • kubernetes for developers • OperaZng Kubernetes • kuberentes for microservicces Anat Zayit, Head of FullStack Community Assaf Gannon, Frontend GL
  14. 14. Kubernetes is what they all have in common What we heard from all our teams
  15. 15. So What ? ✓ New cool tech from Google ✓ Everybody’s seems to be doin’ it ➡ What’s in it for us: ✓ It does this Docker thingy ;) ✓ DeclaraPve formats | Resource DefiniPons ✓ Infrastructure as Code ✓ Flexibility in CI/CD workloads (Pure pay as you go) ✴ MulP-cloud Vendor AgnosPc ✴ Self-managed + As A Service
  16. 16. So What ? It’s a kubexperience ! Something that changed how we experiment, work, operate production
  17. 17. How do we (you ?) kubexperience The How ! How Methodology
  18. 18. Theory Learn what you are building Practice Do it together Conclusion Align -> best practice solution Hands-On kubexperience is a set os session designed as walkthroughs, taking you from Theory to Practice something you can take with you at the end to your playground.
  19. 19. Container & Microservices Docker Promotions only work as well as the marketing. 01 02 Microservices Beyond the single Microservice
  20. 20. ✓ 12 factor app principles ✓Micro service development ✓ Containerisation with Docker (intro 2 docker) ✓ Working with container registries 01 Docker Promotions only work as well as the marketing. 01 Container & Microservices
  21. 21. 02 ✓ Running docker stacks with docker-compose ✓Compose concepts ✓Developing with production in mind ✓12 factor app best practices implementation Microservices Beyond the single Microservice Docker Promotions only work as well as the marketing. 01 Container & Microservices
  22. 22. ✓ 12 factor app principles ✓Micro service development ✓ Containerisation with Docker (intro 2 docker) ✓ Working with container registries 01 Docker Promotions only work as well as the marketing. 02 ✓ Running docker stacks with docker-compose ✓Compose concepts ✓Developing with production in mind ✓12 factor app best practices implementation Microservices Beyond the single Microservice Container & Microservices
  23. 23. Standard Workloads Working with Standard K8s Definitions 04 Kubernetes OS Kubernetes Understanding how k8s works ! 03
  24. 24. Standard Workloads Working with Standard K8s Definitions 04 Kubernetes Understanding how k8s works ! 03 nodes key value store control plane components Kubernetes OS
  25. 25. Kubernetes Understanding how k8s works ! 03 Standard Workloads Working with Standard K8s Resource Definitions Tasks Stateful AppsStateless apps Kubernetes OS
  26. 26. Kubernetes Understanding how k8s works ! 03 nodes key value store control plane components Standard Workloads Working with Standard K8s Resource Definitions 04 Tasks Stateful AppsStateless apps Kubernetes OS
  27. 27. ✓ Packaging application on/for k8s ✓ Helm 3 - Using helm for managing application deployment ✓ Kustomize - the new runner up package manager ✓ Application Templating Microservices Beyond the single Microservice 06 K8s Apps Taking micro services to the application level 05 K8s - Beyond the Basics
  28. 28. 05 K8s Apps Taking micro services to the application level 06 ✓Using repositories and Helm / Kustomise plugins ✓ Explore secrets management options ✓ Explore Operators / “Kubernetes addons” ✓GitOps - way & short intro Microservices Beyond the single Microservice Custom Resource Definitions Kubernetes Operators & Common extensions K8s - Beyond the Basics
  29. 29. use case Application Scaling Replica Sets Load Balancing Multiple pod instances App Proxy proxy-Kube Service Discovery core-dns / kube-dns DNS core-dns / kube-dns Kubernetes out of the box use cases
  30. 30. Develop Docker + docker compose Prep 4 k8s Promotions only work as well as the marketing. Deploy See our demo-app running in k8s Demo 2 3 1
  31. 31. Perquisites Requirements you need 1 Docker container technology Minikube / k3s / Any k8s To host our little project 2 3 Kubectl (1.14+) Compatible with your k8s version
  32. 32. Develop Docker + docker compose Prep 4 k8s Promotions only work as well as the marketing. Deploy See our demo-app running in k8s Demo 2 3 1
  33. 33. Develop Docker + docker compose cat << EOF > package.json { "name": "kubexperience-podinfo", "version": "1.0.0", "description": "DNS LB demo Kubexperience app", "main": "index.js", "scripts": { "start": "node index.js" }, "license": "MIT" } EOF Create a package.json A requirement for building a node app mkdir kubexperience-podinfo Create a project directory To host our little project1 2
  34. 34. Develop Docker + docker compose cat << EOF > index.js var http = require("http"); var os = require("os"); var server = http .createServer(function (request, response) { response.writeHead(200, { "Content-Type": "text/html", }); response.end('Your hostname is: ' + os.hostname()); }) .listen(8080); console.log("Listening on port 8080"); EOF Create an index.js Serve the hostname of the container (pod) 3
  35. 35. Develop Docker + docker compose cat << EOF > Dockerfile FROM node:14.2-alpine RUN mkdir -p /app WORKDIR /app COPY package*.json /app/ RUN npm install COPY . /app EXPOSE 8080 CMD [ "npm", "start" ] EOF Create a Dockerfile Package our application 4 Build your container Package our application Docker build . -t nodejs-http-demo:latest 5 Local Test Package our application echo "http://localhost:8080" && docker run --rm -p 8080:8080 nodejs-http-demo:latest 6
  36. 36. Develop Docker + docker compose Prep 4 k8s Promotions only work as well as the marketing. Deploy See our demo-app running in k8s Demo 2 3 1
  37. 37. Deploy Docker + docker compose Push your container Share on Doekcer hub docker login docker push hagzag/nodejs-http-demo:latest 71
  38. 38. Deploy Generating standard manifests Create a deployment Deployment = rs + pod cat << EOF > deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: ke-podid spec: replicas: 1 template: metadata: labels: deployment: ke-podid spec: containers: - name: ke-podid image: hagzag/nodejs-http-demo:latest EOF 2
  39. 39. Deploy Generating standard manifests Create a service Expose your deployment cat << EOF > service.yaml apiVersion: v1 kind: metadata: creationTimestamp: null labels: app: ke-podinfo name: ke-podinfo spec: ports: - port: 8080 protocol: TCP targetPort: 8080 selector: app: ke-podinfo status: loadBalancer: {} EOF 3
  40. 40. Deploy Generating standard manifests Create a patch file Prepare for more environment cat <<EOF >./kustomization.yaml namePrefix: dev- commonLabels: app: ke-podinfo resources: - deployment.yaml - service.yaml EOF 4 environment prefix
  41. 41. Develop Docker + docker compose Prep 4 k8s Promotions only work as well as the marketing. Deploy See our demo-app running in k8s Demo 2 3 1
  42. 42. Prep for K8s Generating standard manifests kubectl apply -k ./ Apply Deployment [ patch ] Prepare for dev environment5 kustomize is a tool designed to let users “customize raw, template-free YAML files for mulZple purposes, leaving the original YAML untouched and usable as is” (wording taken directly from the kustomize GitHub repository). ... yaml to store the instrucZons on the changes the user wants made to a set of resources.
  43. 43. Prep for K8s Generating standard manifests kubectl delete -k ./ Cleanup Deployment Prepare for dev environment 6 Containers Production Runtime Code
  44. 44. Prep 4 k8s Standard kubernetes manifests Replicaset Deployment Service Namespace kubectl get rs kubectl get deploy kubectl get svc kubectl logs <podId> kubectl describe <podId> kubectl get ns Pod
  45. 45. Backed-in Standards Standard kubernetes manifests Replicaset Deployment Service Namespace kubectl get rs kubectl get deploy kubectl get svc kubectl logs <podId> kubectl describe <podId> kubectl get ns Pod Application Scaling Replica Sets Load Balancing Multiple pod instances App Proxy proxy-Kube Service Discovery core-dns / kibe-dns DNS core-dns / kibe-dns
  46. 46. Develop Docker + docker compose Prep 4 k8s Promotions only work as well as the marketing. Deploy See our demo-app running in k8s 2 3 1 4 Kuberentes in Docker Do everything on your laptop You are the cloud !
  47. 47. Cool tool -> K8s Generating standard manifests kind create cluster --name kubexperience Create a cluster with kind create a cluster locally kind delete cluster --name kubexperience Cleanup Deployment Prepare for dev environment 0 7 kubectl apply -k ./ Apply Deployment [ patch ] Prepare for dev environment52
  48. 48. A cloud experience on your laptop Generating standard manifests kind create cluster --name kubexperience-MetalLB Create a cluster with kind create a cluster locally0 kubectl apply -k ./ Deploy MetalLB So we have a load balancer provider 2
  49. 49. Kubexperience Join our next ride - June 2020 Online kubexperience@bkalk.com

×