K8S - Quick view

  • Context: (copied) 
While Docker provided an open standard for packaging and distributing containerized applications, there arose a new problem. How would all of these containers be coordinated and scheduled? How do all the different containers in your application communicate with each other? How can container instances be scaled? Solutions for orchestrating containers soon emerged. Kubernetes, Mesos, and Docker Swarm are some of the more popular options for providing an abstraction to make a cluster of machines behave like one big machine, which is vital in a large-scale environment.
  • Kubernetes support by cloud providers:
    • Google Container Engine (GKE) by Google
    • Azure Container Service (AKS) by Microsoft
    • Elastic Container Service (EKS) by Amazon

  • Kubernetes interactive playground: https://labs.play-with-k8s.com/
  • Applications are deployed declaratively (yaml)
  • Kubernetes APIs

  • Kubernetes Objects:
    • POD: Object on core api. The smamlest you thing is you can deployon Kunerntes clsutsers. A Pod contains one or more containers
    • Deploy: Object on apps api. Wraps POD. Allow Scaling and manage Rolling updates.
    • DS: (daemonSet) ensure one POD is running per node
    • SVC: SerViCes (e.g lunch a load balancer ...)
    •  PV: persistent volume (a database, storage ..)
    • ...
  • Networking:

    • Every POD has it's own IP

    • Each Service has a Stable name and IP (Kubernetes garante that the name/ip won't change).
    • Every Kubernetes cluster has a native DNS (coreDNS). Each POD can reach A service by its name (using DNS)
    • Type of services:
      1. ClusterIP: the service has an IP, but accessible only inside cluster
      2. NodePort: Wraps ClusterIP and adds cluster-wide port, which is opened outside the cluster.
      3. LoadBalancer

No comments: