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.
On this page
- Watch a component start
- Architecture
- From cluster to container
- The address of a Service
- Ingress × Gateway API
- What an operator does
- Why Kubernetes
- In TDP Kubernetes
Watch a component start
Press Play or step through one at a time. Underlined names lead to the Glossary.
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.
In the Glossary: Helm · Chart · OCI registry
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
Architecture
A control plane and one or more worker nodes form the cluster.
What the figure shows:
- Helm, outside the cluster, combines the chart with the values into a release and sends the chart resources to the API server.
- Argo CD, also outside the cluster, starts from the desired state in Git and sends the chart resources to the API server.
- The OCI registry stores the charts and the container images. The chart goes to Helm, and the image is pulled by the kubelet.
- 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.
- The kubelet on each node ensures that the Pods assigned to it are running and pulls the images from the registry.
- The Pods and the containers run on the nodes, and a container runtime runs the containers.
- The PVC provides persistent storage to some Pods.
- The Service gives the Pods a stable name and address.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
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 Glossarydata— 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.
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.
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.
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.
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.
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.
In the Glossary: CRDs
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
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.
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.
Kubernetes clusters, Red Hat OpenShift, or Rancher Manager, with Helm 3.
Each component has its own chart, such as tdp-airflow or tdp-trino, configured by a values file and installed as a release.
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.
The other components can be delivered by Argo CD, as Applications that point to the charts and their values. See Installation via Argo CD.
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.
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.
ClickHouseInstallation and ClickHouseKeeperInstallation resources. Shared, in the same tdp-operator chart.
NifiCluster resource and related types. It comes in the tdp-nifi chart, enabled by default and restricted to the release namespace.
PlatformLicense and LicensePolicy resources, from the tdp-license chart. The platform requires a valid TDP license (License configuration).
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
TDP Kubernetes
TDP Kubernetes Architecture
The components, storage, installation order, and environments in the cluster.
Installation
Prerequisites
Cluster, storage, exposure, registry, namespace, and license before the first chart.
Sources
Kubernetes - DNS for Services and Pods
Kubernetes - Ingress NGINX Retirement
Kubernetes - Persistent Volumes
Helm - Introduction and Architecture