Skip to main content

Environments organized by namespace,
isolated by policies.

How the components are distributed across namespaces, the registry credential, and the network rules per namespace, with a scenario of production, staging, and development in the same cluster.

Organization in namespaces​

Namespaces organize the resources. Permissions and policies complete the isolation.

A namespace is a logical division of the Kubernetes cluster.

The resources of a namespace (Pods, Secrets, PVCs and network rules) are grouped together and can be administered, protected and removed as a whole.

The concept is detailed in Kubernetes.

The TDP Kubernetes components are deployed in the chosen namespace. In direct application with Helm, each installation is recorded as a release.

This way, the same cluster can host several independent instances of a component: for example, one Kafka cluster for each business area, each in its own namespace, all served by the same operator. Exception: CloudBeaver supports a single instance per namespace, because three chart resources have fixed names.

The platform's default namespace is tdp-system. The division of the other namespaces is defined by the team: by project or business area, by component or by environment (production, staging and development). The figure in TDP Kubernetes Architecture shows an example with one namespace per project.

Platform namespace

tdp-system receives the platform foundation: the license (tdp-license) and the shared operators (tdp-operator).

Dedicated namespace

One component per namespace. Separates the resources and credentials of each component and allows applying specific rules to it. Effective isolation comes from the rules applied to the namespace, such as network and permission rules: without them, Pods in different namespaces communicate normally.

Shared namespace

Several components of the same solution in the same namespace, such as a complete pipeline of a team.

Cluster scope

Custom resource definitions (CRDs) do not belong to any namespace and apply to the entire cluster.

Registry credential per namespace​

The TDP images come from the Tecnisys private registry, and each namespace that receives components has its own tdp-registry access Secret, created with the registry user and CLI Secret.

note

The Secret exists in every namespace that receives TDP components, including the platform namespace. The deploy.sh --license of the GitOps kit only creates it in the license namespace (tdp-system). In the others, the Secret must exist before helm install, or the installation stays in ImagePullBackOff.

Creating the Secret and obtaining the user and the CLI Secret: Prerequisites › Authentication in the OCI Registry.

Network rules per namespace​

Kubernetes NetworkPolicies control which Pods can communicate and turn the separation into namespaces into traffic isolation.

The ready-made network rules for JupyterHub, Trino and Spark, and the precautions when restricting egress traffic, are in Security model › Network.

Network policies

NetworkPolicy example in Cluster policies. Platform namespace in Prerequisites.

Scenario: production, staging and development in the same cluster​

Production, staging and development in the same cluster, each in its own namespace.

In a scenario with three environments, each one occupies its own namespace: production, staging and development.

Kubernetes mechanisms separate the resources, permissions and traffic of each environment, and the TDP charts are installed in each namespace as independent releases.

Release per environment

Each namespace receives its own release of each component, with its own values file and the chart version chosen for that environment, which can differ from the others. In GitOps delivery, the Application of each environment references the chart, the version and the values of that environment. The tdp-registry Secret is created in each namespace.

ResourceQuota and LimitRange

The ResourceQuota limits the total CPU, memory and objects a namespace can consume, and the LimitRange defines the default values and limits of each container. This way, development can receive a smaller quota than production. The quota must also accommodate the Pods created by autoscaling.

RBAC

Kubernetes Roles and RoleBindings grant permissions per namespace: a team can administer the development resources without access to the production Secrets.

NetworkPolicies

Define the allowed traffic between the Pods of the environments. The rules are enforced by the cluster network plugin (CNI).

Common to all three

The CRDs of tdp-crds and the shared operators of tdp-operator are installed once per cluster and serve the releases of all three environments.

Quotas and workload separation

See also​