2024-04-08 at

TIL : Disambiguating the main Lifecycle of a Kubernetes Operation : by using "Cluster API" as an example : with a note on the Separation of Concerns addressed by Knative

Executive Summary

  • - kubernetes is software that manages software - but it doesn't provision or deprovision hardware
  • - kubernetes HAS an extension / sub-project called ClusterAPI that DOES de/provision hardware ( but it runs as ... surprise, its own kubernetes cluster, so it requires a bootstrap to provision the first hardware, for the first cluster, which then manages all the other hardware and clusters )
  • - ALL of the above is basically a super complicated replication and load-balancing framework ... to get from there to anything that remotely resembles a PaaS or FaaS that developers can use ... you might consider the Knative framework for Kubernetes

/// 1. SOFTWARE ///

  • - - Kubernetes (K8s) is an application which manages other applications in a cluster of machines, but does not de/provision the hardware which any of this software is executed on
  • - - a K8s Ingress is a network point for non-cluster parties to gain access to a K8s Cluster
  • - - a K8s Cluster's Control Plane manages the Cluster's Services ; the Control Plane may run on one, or more ( hardware ) Nodes in their Cluster ... sometimes referred to as Master Nodes or Control Nodes
  • - - a K8s Service is a composed set of applications running in a K8s Cluster ; a Cluster may run one or more Services ; the distinguishing quality of a Service is that it is available, as opposed to ephemeral ; Services may run on one, or more ( hardware ) Nodes in their Cluster ... almost always referred to as Worker Nodes ( the use of the phrase "Data Plane" to refer to K8s Services is a misnomer, badly copied from the domain of networking terminology, from where the term "Control Plane" originated )

/// /// 1.1. Composition of a Service /// ///

  • - - - - a K8s Deployment of a K8s Service specifies a change in a ReplicaSet
  • - - - - a K8s ReplicaSet specifies a number of identical Pods to maintain in a K8s Service, based on a PodTemplate
  • - - - - a K8s Pod is the smallest defineable application in a K8s Service ( Amazon refers to Pod as "Tasks" ) ; a K8s Service may contain one or more Pods ; Pods implement Services ; Pods are expected to be ephemeral ; a Pod's definition is referred to as a PodTemplate ; a Service can also specify Pods without a ReplicaSet
  • - - - - a Operating System Container is a jail for applications ; a Pod may contain one or more Containers ; Containers implement Pods ; because Pods are expected to be ephemeral, Containers are expected to be ephemeral 

/// /// 1.2. Knative : Opinionated K8s /// ///

  • - - Knative is a K8s Extension, and opinionated framework, for resource management in K8s ; one the often cited use-cases is for developers trying to build a Platform-as-a-service, Container-as-a-Service, or Functon-as-a-Service, on K8s clusters

/// 2. HARDWARE "INFRASTRUCTURE" ( physical or virtual ) ///

  • - - physical or virtual machines in K8s are called Nodes ( see Master Node, Control Node, Worker Node, above )
  • - - Cluster API (CAPI) is a K8s software sub-project which can handle the de/provisioning of said infrastructure ; CAPI itself, of course, runs on infrastructure, which needs to be bootstrapped
  • - - CAPI Management Clusters are K8s clusters used to run CAPI
  • - - CAPI Workload Clusters are other K8s clusters managed by a Management Cluster

/// /// 2.1. Bootstrapping CAPI's Management Cluster /// ///

  • - - - - OpenToFu, or something else, may be used to bootstrap infrastructure provisioning
  • - - - - a CAPI Bootstrap Provider ( e.g. kubeadm init ) may be used to bootstrap the Kubernetes (K8s) cluster upon the bootstrapped infrastructure 
  • - - - - ... to close the loop, bootstrapping needs a symmetrical automation to terminate the Management Cluster and to deprovision its infrastructure

No comments :

Post a Comment