Kubernetes TLS Secret Guidelines
This chapter provides detailed guidelines for structuring Kubernetes Secrets that contain TLS certificates for PAS-X MES Services.
Secret Structure
Supported Certificate Formats
PAS-X MES consumes certificate material from Kubernetes Secrets.
|
Exception – Argo CD Repository/Registry Trust When configuring trust for private Git repositories or OCI registries used by Argo CD, certificates cannot be provided via standard Kubernetes Secrets referenced by PAS-X MES. Instead, the certificates must be configured directly within Argo CD (for example, via the Argo CD CLI or UI). Argo CD maintains its own trust configuration for repository access, which is independent of the MES Services' trust configuration. For further details, see Argo CD – Trust Custom TLS Certificates. |
The required secret content and keys depend on the specific use case (for example, outgoing trust material versus incoming server identity material). In all cases, PAS-X MES expects standard X.509 certificates encoded in PEM format.
Typically:
-
Certificates (CA and end-entity/leaf certificates) are provided as PEM-encoded X.509 certificates.
-
Private keys (when required) are provided as PEM-encoded private keys.
-
Certificate chains may be provided as concatenated PEM blocks, depending on the issuing tool and runtime requirements.
|
| Please ensure that you have the necessary RBAC permissions to create and update secrets in the PAS-X MES installation namespace. |
Secret Trust Domain Scope
PAS-X MES uses one trust domain per secret to keep ownership and rotation clear. A trust domain is a set of external endpoints that share the same trust anchors (Root and/or Intermediate CAs) and therefore can be validated using the same CA trust material.
The same trust Secret may be reused by multiple MES Services that communicate with endpoints in that trust domain.
Communication Patterns
In PAS-X MES, communication patterns describe where TLS is terminated and which party performs certificate validation, depending on the direction of the connection:
-
Outgoing connections originate from MES Services inside the cluster towards external systems. MES Services act as TLS clients and must validate the external server certificate chain.
-
Incoming connections use identity material at the component that terminates TLS, such as an Ingress Controller, OpenShift router, or backend service.
These patterns require different certificate material and are not interchangeable:
-
Trust material (outgoing TLS) – used to validate remote endpoints, e.g., CA certificate chains for databases, ERP systems, or mail servers.
-
Identity material (incoming TLS) – used to present a certificate (server identity) and private key for incoming connections, e.g., TLS termination at Ingress or service endpoints.
Most installations require both, as services typically expose HTTPS endpoints (incoming) while also connecting to external systems (outgoing).
Trust Material
Provides CA bundles used to validate outgoing TLS connections to external systems. Each bundle is assigned to a specific trust domain.
Recommended secret type: Opaque
|
|
Required key:
-
ca.crt: PEM-encoded CA trust bundle containing the root CA certificate and, if required, one or more intermediate CA certificates (concatenated PEM blocks).
apiVersion: v1
kind: Secret
metadata:
name: database-ca-certificates
namespace: <namespace>
type: Opaque
stringData:
ca.crt: <pem-ca-bundle>
|
The trust material contract is intentionally strict: PAS-X MES consumes only |
Identity Material
Provides certificates and private keys used to present a TLS identity for incoming connections.
Recommended secret type: kubernetes.io/tls
|
This secret type enforces the conventional keys ( For further information, refer to the official Kubernetes documentation: Kubernetes TLS Secrets |
Required keys:
-
tls.crt: PEM-encoded server (leaf) certificate. Depending on the issuer, this may include the intermediate certificate chain appended to the leaf certificate. -
tls.key: PEM-encoded private key. -
ca.crt: PEM-encoded CA certificate, if required by the consuming component.
apiVersion: v1
kind: Secret
metadata:
name: tls-termination-secret
namespace: <namespace>
type: kubernetes.io/tls # Could be Opaque, but using the TLS type is indicated for cert+key pairs
stringData:
ca.crt: <pem-ca-certificate-from-issuer>
tls.key: <pem-private-key>
tls.crt: <pem-signed-certificate-chain>
OpenShift edge Route certificates
Confirm that the cluster supports Route.spec.tls.externalCertificate and that its router can access referenced TLS Secrets.
Edge Routes terminate TLS at the OpenShift router and forward HTTP traffic to the backend.
MES Service, MES API Gateway, MES Installation Server, and RabbitMQ management UI Routes reference a Secret through spec.tls.externalCertificate.name.
Certificate and private key data are not embedded in the Route.
Provide a kubernetes.io/tls Secret in the Route’s namespace, using the identity material above and a certificate valid for its hostname.
Set ingress.tls.secretName explicitly whenever ingress TLS is enabled.
For certificate issuance options, see OpenShift certificate provisioning.
The router requires role-based access control (RBAC) permissions to read the named Secret.
The Role grants get, list, and watch on Secrets, restricted by resourceNames to that Secret.
The RoleBinding references the configured router ServiceAccount.
Both resources reside in the Route’s namespace.
| Route configuration | RBAC owner |
|---|---|
Instance / MES Service Routes |
The MES Operator reconciles the Role and RoleBinding for the Instance TLS Secret. |
MES API Gateway, MES Installation Server, RabbitMQ management UI |
The respective Helm chart renders the Role and RoleBinding for its TLS Secret. |
Naming and Key Conventions
Follow cert-manager and Kubernetes conventions for TLS-related Secret data.
-
tls.crtandtls.keyfor TLS certificate and private key pairs. -
ca.crtfor CA trust material (Root CA and, if required, Intermediate CA certificates).
|
The use of these keys is independent of the Kubernetes Secret type. In particular, |
Key Usage Principles
-
Key names are standardized across all TLS-related Secrets to ensure consistency and interoperability.
-
The meaning of each key is defined by its semantic role, not by the Secret type.
-
Additional keys may be present but are ignored unless explicitly referenced by PAS-X MES configuration.