Kubernetes
Kubernetes (k8s)
• Tool to deploy and run Applications in containers
• Google in 2014
• Container Orchestration and scaling
• Best Suited for Microservices and Distributed Systems
• Why not Docker?
• Runs largely on a single server – Single Point of Failure
• Docker Cluster and Swarm never became popular
• Support for other container Runtimes – Kubernetes can run multiple
container runtimes
Kubernetes (k8s)
Kubernetes (k8s)
Kubernetes Getting Started
• Play-With-K8s
• Miniqube – Learn on own system
• No Separate Master/Worker Nodes
• Single System is both Master and Node
• KubeAdm
• Reqires multiple VMs
Alternatives to MiniQube
• Minikube, while excellent for simple, local Kubernetes environments,
is NOT recommended in a production environment.
• Scalability Challenges – best suited for learning the basics of
Kubernetes
Alternatives to MiniQube
• KIND - Kubernetes in Docker
• Fast and lightweight container creation
• Declarative approach to cluster Configuration similar to Terraform or other
IAC
• Multiple Kubernetes Version support
• Again best suited for learning and development support
• Harder to setup over MiniQube
Alternatives to MiniQube
• K3S
Alternatives to MiniQube
• K3S
• Both Single and Multiple Node Configuration
• Minimal Memory footprint
• Inbuilt Security Support – TLS, RBAC, Reduced Surface
• Containerd (Similar to Docker)
• Best Suited for Edge and IOT
Alternatives to MiniQube
• Microk8S
• Single node like MiniQube
• Less Resources
• Multiple Plugins
• More Secure
• Closer to Production – so easier to leverage going from Development to
Production
• Steep Learning Curve
• Better Integrated with CI/CD tools
• Private Cloud and OnPrem Support
Alternatives to MiniQube
• Rancher
• Production Ready Capabilities – Security, Multi-Node, Scaling
• Multi-Cluster Management
• Resource Heavy
• Steep Learning Curve
• Hybrid and Multi-Cloud Support
PODS
• A group of 1 or more container
• Smallest deployable - Similar to what we have seen with docker-compose
• Created via Deployments
• StateFulSet resource for managing state
• Can be horizontally scaled – Called Replication in Kubernetes world.
• Name of a pod is a valid DNS subdomain value – This allows them to be
accessed via name (Like docker compose does for services)
• PodTemplates are like Docker Images and are specifications for creating
Pods
PODS
• Static PODS are managed by the kubelet Daemon or specific node
Kubernetes
• WSL2
• Docker Desktop
• Ubuntu 18 from App Store
• Terminal
Kubernetes
• Kubectl
• Minikube
• K3s
• Microk8s
• Kind
• Rancher
• Docker Desktop
Kubernetes
• Container Orchestration
• Automating SW Development
• Scaling
• Management
• Cloud Native Computing Foundation
Kubernetes
• Primary/replica architecture
• Control Pane
• ETCD = Key value data Store - Configuration data of the cluster and
distributed
• Consistency over availability
• API Server
• Scheduler

An Introduction to Kubernetes its architecture and code

  • 1.
  • 2.
    Kubernetes (k8s) • Toolto deploy and run Applications in containers • Google in 2014 • Container Orchestration and scaling • Best Suited for Microservices and Distributed Systems • Why not Docker? • Runs largely on a single server – Single Point of Failure • Docker Cluster and Swarm never became popular • Support for other container Runtimes – Kubernetes can run multiple container runtimes
  • 3.
  • 4.
  • 5.
    Kubernetes Getting Started •Play-With-K8s • Miniqube – Learn on own system • No Separate Master/Worker Nodes • Single System is both Master and Node • KubeAdm • Reqires multiple VMs
  • 6.
    Alternatives to MiniQube •Minikube, while excellent for simple, local Kubernetes environments, is NOT recommended in a production environment. • Scalability Challenges – best suited for learning the basics of Kubernetes
  • 7.
    Alternatives to MiniQube •KIND - Kubernetes in Docker • Fast and lightweight container creation • Declarative approach to cluster Configuration similar to Terraform or other IAC • Multiple Kubernetes Version support • Again best suited for learning and development support • Harder to setup over MiniQube
  • 8.
  • 9.
    Alternatives to MiniQube •K3S • Both Single and Multiple Node Configuration • Minimal Memory footprint • Inbuilt Security Support – TLS, RBAC, Reduced Surface • Containerd (Similar to Docker) • Best Suited for Edge and IOT
  • 10.
    Alternatives to MiniQube •Microk8S • Single node like MiniQube • Less Resources • Multiple Plugins • More Secure • Closer to Production – so easier to leverage going from Development to Production • Steep Learning Curve • Better Integrated with CI/CD tools • Private Cloud and OnPrem Support
  • 11.
    Alternatives to MiniQube •Rancher • Production Ready Capabilities – Security, Multi-Node, Scaling • Multi-Cluster Management • Resource Heavy • Steep Learning Curve • Hybrid and Multi-Cloud Support
  • 12.
    PODS • A groupof 1 or more container • Smallest deployable - Similar to what we have seen with docker-compose • Created via Deployments • StateFulSet resource for managing state • Can be horizontally scaled – Called Replication in Kubernetes world. • Name of a pod is a valid DNS subdomain value – This allows them to be accessed via name (Like docker compose does for services) • PodTemplates are like Docker Images and are specifications for creating Pods
  • 13.
    PODS • Static PODSare managed by the kubelet Daemon or specific node
  • 14.
    Kubernetes • WSL2 • DockerDesktop • Ubuntu 18 from App Store • Terminal
  • 15.
    Kubernetes • Kubectl • Minikube •K3s • Microk8s • Kind • Rancher • Docker Desktop
  • 16.
    Kubernetes • Container Orchestration •Automating SW Development • Scaling • Management • Cloud Native Computing Foundation
  • 17.
    Kubernetes • Primary/replica architecture •Control Pane • ETCD = Key value data Store - Configuration data of the cluster and distributed • Consistency over availability • API Server • Scheduler