Skip to main content

You declare the state,
Kubernetes maintains it.

Kubernetes runs containerized applications on a cluster of machines, replaces what fails, and gives each service a stable name on the network. It is the foundation of the TDP Kubernetes edition. Follow a component from the chart to its running Pods and see what an operator adds.

A container orchestration platform manages containerized applications on a cluster, with declarative configuration and automation. Kubernetes is the foundation on which the TDP Kubernetes edition installs the platform components.

Declarative

The desired state becomes reality

Each object describes the desired state, and the controllers work continuously to bring the current state of the cluster closer to it.

Self-healing

What fails is replaced

Containers that fail are restarted or replaced, and those that do not respond to the health check only receive traffic again once they are ready.

Extensible

New resource types

CRDs add types to the API, and Operators teach the cluster to operate entire applications, such as a Kafka cluster, a ClickHouse installation, or a NiFi cluster.

On this page

Watch a component start​

Press Play or step through one at a time. Underlined names lead to the Glossary.

InstallationWho applies the chart
HelmInstalls the chart as a release
Argo CDApplies the state declared in Git
OCI registryWhere the packages come from
ChartThe component's resources
ImageThe container ready to run
Control planeWho stores and decides
API serverReceives and stores the objects
ControllersRequest the missing Pods
kube-schedulerChooses the node for each Pod
NodeWhere the Pods run
kubeletStarts the Pods
PodThe running containers
PVCThe persistent storage
NetworkHow to reach them
ServiceStable name and address
Ingress or Gateway APIHTTP and HTTPS entry point
Step 1 of 7

1 The chart leaves the registry

Everything starts with a chart: the package with the definitions of the resources the component needs to run. Helm gets it from an OCI-compatible registry, which stores charts and container images.

  1. The chart leaves the registry. Everything starts with a chart: the package with the definitions of the resources the component needs to run. Helm gets it from an OCI-compatible registry, which stores charts and container images.
  2. Chart plus values, a release. Helm combines the chart with the configuration values, creates a release to track the installation, and sends the resources to the API server. With Argo CD, the same resources reach the API server from the state declared in a Git repository.
  3. The desired state is stored. Deployments or StatefulSets, Services, ConfigMaps, and Secrets now exist as API objects, stored in etcd. Each object carries its desired state in the spec field: how many replicas, with which image, with which volumes.
  4. The controllers request the Pods. The controller of each workload compares the desired state with the current one and asks the API server for the missing Pods: the Deployment through a ReplicaSet, the StatefulSet in order, each Pod with its own number. The kube-scheduler assigns a node to each Pod that does not have one yet.
  5. The kubelet starts the containers. On the chosen node, the kubelet ensures that the Pod is running, with the containers created from the image pulled from the registry. With a private registry, the credential comes from a Secret, which must be in the same namespace as the Pod.
  6. The persistent volume is attached. A StatefulSet gives each Pod its own PVC. A control loop in the control plane binds the PVC to a matching PersistentVolume, or to a volume created on the spot by a StorageClass, and the volume is mounted in the Pod.
  7. A Service provides the address. Pods are ephemeral, and each one has its own IP. The Service groups the Pods that its selector matches under a stable name and address, which the cluster DNS resolves. For clients outside the cluster, Ingress or Gateway API carry HTTP and HTTPS traffic to the Service.
Figure 1 - A component starts on Kubernetes. Helm and Argo CD deliver the objects to the API server. From there on, the controllers, the kube-scheduler, and the kubelet do the work.

Architecture​

A control plane and one or more worker nodes form the cluster.

Kubernetes architecture: control plane, nodes, Pods, Service and exposure, with Helm, Argo CD and the OCI registry outside the clusterOutside the cluster, Helm and Argo CD send a chart's resources to the API server, and the OCI registry stores the charts and the container images. In the cluster, the control plane brings together the API server, etcd, the kube-scheduler and the controllers. On each node, the kubelet runs the Pods, with their containers, and pulls the images from the registry; some Pods have a PVC with persistent storage. A Service gives the Pods a stable name and address, and the Ingress or the Gateway API carry the HTTP and HTTPS traffic coming from outside the cluster to it.Helmchart + values = releaseArgo CDdesired state in GitOCI registrychartscontainer imagesUsersKubernetes clusterControl planeAPI serverexposes the Kubernetes APIetcdstores the API datakube-schedulerpicks the Pod's nodeControllersreconcile actual and desiredNodeNodekubeletkubeletPodPodPodPodContainerContainerContainerContainerContainerContainerPVCPVCServicestable name and address for the PodsIngressorGateway APIHTTP and HTTPS traffic from outside the clusterchartimage
Figure 2 - Kubernetes architecture: control plane, nodes with their Pods, Service and exposure, with Helm, Argo CD, and the OCI registry outside the cluster. Underlined terms lead to the Glossary.

What the figure shows:

  1. Helm, outside the cluster, combines the chart with the values into a release and sends the chart resources to the API server.
  2. Argo CD, also outside the cluster, starts from the desired state in Git and sends the chart resources to the API server.
  3. The OCI registry stores the charts and the container images. The chart goes to Helm, and the image is pulled by the kubelet.
  4. The control plane manages the overall state of the cluster: the API server exposes the Kubernetes API, etcd stores the data of that API, the kube-scheduler chooses the node for each Pod, and the kube-controller-manager runs the controllers.
  5. The kubelet on each node ensures that the Pods assigned to it are running and pulls the images from the registry.
  6. The Pods and the containers run on the nodes, and a container runtime runs the containers.
  7. The PVC provides persistent storage to some Pods.
  8. The Service gives the Pods a stable name and address.
  9. The Ingress or the Gateway API carry the HTTP and HTTPS traffic that comes from outside the cluster, from users, to the Service.

From cluster to container​

Where each piece lives: five levels, each inside the next.

Level 1 of 5

Cluster

A control plane and one or more worker nodes, which run the containerized applications. Some objects apply to the whole cluster and do not belong to any namespace, such as nodes, StorageClasses, PersistentVolumes, and CRDs.

  • NodeA machine of the cluster, physical or virtual. The Pods run on the nodes.
  • StorageClassA storage class, with the provisioner that creates volumes on demand.
  • CRDA new resource type registered in the cluster API.
  1. Cluster. A control plane and one or more worker nodes, which run the containerized applications. Some objects apply to the whole cluster and do not belong to any namespace, such as nodes, StorageClasses, PersistentVolumes, and CRDs.
    • Node. A machine of the cluster, physical or virtual. The Pods run on the nodes.
    • StorageClass. A storage class, with the provisioner that creates volumes on demand.
    • CRD. A new resource type registered in the cluster API.
  2. Namespace. Isolates groups of resources within the same cluster: a name must be unique within the namespace, not across namespaces. A namespace does not sit inside another, and each resource is in only one.
    • ConfigMap. Non-confidential configuration data, in key-value pairs, that Pods consume.
    • Secret. Passwords, tokens, and keys, stored apart from the Pods that use them.
    • Service. A stable name and address for a set of Pods.
  3. Deployment or StatefulSet. The object that keeps the Pods of an application running. The Deployment handles interchangeable replicas, usually of applications that do not store state. The StatefulSet gives each Pod a fixed identity, with an ordered name, its own network identity, and persistent storage.
    • PVC. In a StatefulSet, each Pod receives its own PersistentVolumeClaim, and the identity follows the Pod to any node where it runs again.
  4. Pod. The smallest unit that Kubernetes deploys: one or more containers that share network and storage. Each Pod has its own IP, and its containers talk to each other over localhost. Pods are ephemeral and disposable. The workload, through its controller, creates and replaces them.
  5. Container. The application packaged with the dependencies it needs to run. It does not change at runtime: a change produces a new image, and the container is recreated from it.
    • Container image. The ready-to-run package, with the code, the runtime, the libraries, and the default settings. The name can include the source registry.
Figure 3 - From cluster to container: each level contains the next. The terms alongside accompany the level.

The address of a Service​

Inside the cluster, components find each other by name, not by IP.

Click each part of the name.

Service

The name of the Service. It groups the Pods that its selector matches and answers for them at a stable address, the cluster IP, even when the Pods change.

See in the Glossary
data — Service
The name of the Service. It groups the Pods that its selector matches and answers for them at a stable address, the cluster IP, even when the Pods change.
prod — Namespace
The namespace of the Service. A query without a namespace searches only the namespace of the Pod itself. To reach a Service in another namespace, the name carries its namespace.
svc — Service record
The fixed part that marks, in the cluster DNS, the names given to Services.
cluster.local — Cluster domain
The cluster domain. The kubelet configures the DNS of each Pod to complete short names: in a Pod in the test namespace, a query for data becomes data.test.svc.cluster.local.

A Pod in the test namespace reaches this Service as data.prod or by the full name, data.prod.svc.cluster.local.

In TDP Kubernetes, when a component uses a PostgreSQL database installed in another namespace, the database address follows this same format.

Ingress × Gateway API​

Two Kubernetes APIs for carrying HTTP and HTTPS traffic from outside the cluster to a Service.

Ingress

An object that routes HTTP and HTTPS traffic from outside the cluster to Services, by host and path rules, with load balancing, TLS termination, and name-based virtual hosts. It only takes effect with an Ingress controller in the cluster. The API is frozen: it remains available and stable, with no new changes. See Ingress.

Gateway API

A role-oriented family of APIs: the GatewayClass indicates the controller that implements it, the Gateway defines the entry point with its listeners, and the HTTPRoute carries traffic from a listener to a Service. Header-based routing and weighted traffic splitting are part of the API. It is the form the Kubernetes project recommends in place of Ingress. See Gateway API / HTTPRoute.

Controllers

Both APIs depend on an implementation installed in the cluster. The Kubernetes project announced the retirement of the community Ingress NGINX controller. The Ingress API continues, with other controllers, and the Gateway API is the indicated replacement.

In TDP Kubernetes

The charts of the components with a web interface accept both forms, and the choice follows the cluster's network infrastructure. See External exposure.

What an operator does​

One example among the TDP operators: a Kafka cluster declared as a Kubernetes resource. The operator takes care of the rest.

DeclarationWhat is requested
Kafka releaseCreates the Kafka resource
Kubernetes APIWhere the request stays
CRDsThe Kafka, KafkaTopic, KafkaUser types
Kafka resourceThe desired Kafka cluster
OperatorWho reconciles
StrimziKafka Cluster Operator
In the clusterWhat starts running
Kafka clusterDeployed as the resource describes
Topic and User OperatorsTopics and users as resources
Step 1 of 6

1 The CRDs arrive first

Before any component, a dedicated chart registers the platform CRDs in the cluster. From then on, the Kubernetes API recognizes new types, such as Kafka, KafkaTopic, and KafkaUser, and objects of those types are created and read like native resources.

  1. The CRDs arrive first. Before any component, a dedicated chart registers the platform CRDs in the cluster. From then on, the Kubernetes API recognizes new types, such as Kafka, KafkaTopic, and KafkaUser, and objects of those types are created and read like native resources.
  2. One operator for the whole cluster. The Kafka operator, Strimzi, is installed only once, in the platform namespace, and starts watching the Kafka resources in all namespaces.
  3. The release declares the Kafka cluster. The component release, in the chosen namespace, creates a Kafka resource with the cluster configuration. It is the desired state, stored in the API like any other object.
  4. The operator reconciles. The operator is the controller of this resource: it notices the new Kafka resource and tells the API server what to create so that the real cluster matches the declared one. The Kafka cluster is deployed as the resource describes.
  5. Topics and users are resources too. Through the configuration of the Kafka resource, the Cluster Operator also deploys the Topic Operator and the User Operator, which manage the topics and users declared as KafkaTopic and KafkaUser resources.
  6. Change the resource, change the cluster. The operator follows the Kubernetes control loop and continuously compares what is declared with what is running. A change made to the Kafka resource is carried by the operator to the cluster.
Figure 4 - What an operator does. The release declares the Kafka cluster in a resource. The operator compares what is declared with what is running and creates what is missing.

The same pattern applies to the other operators of the platform: Altinity operates the ClickHouse declared in a ClickHouseInstallation resource; NiFiKop, the NiFi declared in a NifiCluster; the OMJob operator, the OpenMetadata ingestion jobs declared in an OMJob; and the platform license is declared in a PlatformLicense. See Operators used by TDP.

Why Kubernetes​

Network

Discovery and load balancing

Each service is reached by a DNS name or by its own IP, and traffic is distributed among the replicas when demand grows.

Storage

Volumes mounted on demand

The chosen storage system, local or from a cloud provider, is mounted automatically in the Pods that need it.

Updates

Rollouts and rollbacks

A new version rolls out at a pace controlled by the desired state, and the previous one can be restored if the update does not go as planned.

Resources

Fitting onto the nodes

With the CPU and memory of each container specified, Kubernetes distributes the containers across the nodes to make better use of the cluster resources.

Configuration

Secrets and configuration kept apart

Passwords, tokens, and application configuration are updated without rebuilding the container images.

Scale

More replicas, more capacity

The application scales up and down by command, through a UI, or automatically, based on CPU usage.

Where the name comes from

Kubernetes comes from Greek and means helmsman or pilot. K8s is the abbreviation that counts the eight letters between the K and the s. Google open sourced the project in 2014, bringing together its experience with production workloads at scale and the best ideas and practices of the community.

In TDP Kubernetes​

The TDP Kubernetes edition delivers each platform component as a Helm chart, published in an OCI registry along with the container images. The platform's base charts come before the others. The components come afterward, through Helm or Argo CD, in the sequence described in Installation via Helm and Installation via Argo CD.

The complete architecture, with the components, storage, and environments, is in TDP Kubernetes Architecture.

Where it runs

Kubernetes clusters, Red Hat OpenShift, or Rancher Manager, with Helm 3.

One chart per component

Each component has its own chart, such as tdp-airflow or tdp-trino, configured by a values file and installed as a release.

Platform base

tdp-crds registers the CRDs; tdp-license installs the TDP license, which must be valid; tdp-argo installs Argo CD; tdp-operator brings the shared Kafka and ClickHouse operators.

GitOps delivery

The other components can be delivered by Argo CD, as Applications that point to the charts and their values. See Installation via Argo CD.

Exposure

Ingress or Gateway API, according to the cluster's network infrastructure. See Ingress × Gateway API.

Operators used by TDP​

The operators below accompany the TDP Kubernetes charts, and the CRDs for all of them come in the tdp-crds chart.

Strimzi · Apache Kafka

Kafka, KafkaNodePool, KafkaTopic, KafkaUser, and KafkaConnect resources. Shared: it comes in the tdp-operator chart, once per cluster, and serves the Kafka releases in any namespace.

Altinity · ClickHouse

ClickHouseInstallation and ClickHouseKeeperInstallation resources. Shared, in the same tdp-operator chart.

NiFiKop · Apache NiFi

NifiCluster resource and related types. It comes in the tdp-nifi chart, enabled by default and restricted to the release namespace.

Platform license

PlatformLicense and LicensePolicy resources, from the tdp-license chart. The platform requires a valid TDP license (License configuration).

OMJob · OpenMetadata

OMJob and CronOMJob resources, for the ingestion jobs. It comes in the tdp-openmetadata chart, disabled by default.

What each operator does and what remains with the team is in TDP Kubernetes Architecture › Kubernetes Operators. The configuration is in Operators Configuration.

Namespace organization​

The platform's default namespace, tdp-system, receives the license and the shared operators. The components stay in the namespaces defined by the team, usually one release per namespace, and the same operator serves all of them.

Each namespace that receives components carries its own registry access Secret, because a Pod only uses pull credentials from its own namespace.

The ways to organize namespaces are in TDP Kubernetes Architecture › Namespace organization.

Next steps​

Sources​

Kubernetes - Overview

Kubernetes - Components

Kubernetes - Containers

Kubernetes - Images

Kubernetes - Pods

Kubernetes - Deployments

Kubernetes - StatefulSets

Kubernetes - Service

Kubernetes - DNS for Services and Pods

Kubernetes - Ingress

Kubernetes - Gateway API

Kubernetes - Ingress NGINX Retirement

Kubernetes - Persistent Volumes

Kubernetes - ConfigMaps

Kubernetes - Secrets

Kubernetes - Namespaces

Kubernetes - Controllers

Kubernetes - Operator pattern

Kubernetes - Custom Resources

Helm - Introduction and Architecture

Helm - Use OCI-based registries

Argo CD - Overview

Argo CD - Core Concepts

Strimzi - Overview