You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/k8s-best-practices-affinity-anti-affinity.adoc
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,8 @@ Pods that need to be co-located on the same node need affinity rules. Pods that
34
34
co-located for resiliency purposes require anti-affinity rules.
35
35
36
36
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#lifecycle-affinity-required-pods[lifecycle-affinity-required-pods]
37
+
38
+
**Impacts and Risks of Non-Compliance:** Missing affinity rules can cause incorrect pod placement, leading to performance issues and failure to meet co-location requirements.
37
39
====
38
40
39
41
.Workload requirement
@@ -43,5 +45,7 @@ Pods that perform the same microservice and could be disrupted if multiple membe
43
45
unavailable must implement affinity/anti-affinity group rules or spread the pods across nodes to prevent disruption in the event of node failures, patches, or upgrades.
44
46
45
47
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#lifecycle-pod-high-availability[lifecycle-pod-high-availability]
48
+
49
+
**Impacts and Risks of Non-Compliance:** Missing anti-affinity rules can cause all pod replicas to be scheduled on the same node, creating single points of failure.
Copy file name to clipboardExpand all lines: modules/k8s-best-practices-automount-services-for-pods.adoc
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,3 +18,5 @@ Pods must include an explicit `serviceAccountName` in the pod spec. This is requ
18
18
19
19
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#access-control-pod-automount-service-account-token[access-control-pod-automount-service-account-token]
20
20
21
+
**Impacts and Risks of Non-Compliance:** Auto-mounted service account tokens expose Kubernetes API credentials to application code, creating potential attack vectors if applications are compromised.
Copy file name to clipboardExpand all lines: modules/k8s-best-practices-avoid-the-host-network-namespace.adoc
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,4 +9,6 @@ Application pods must avoid using `hostNetwork`. Applications may not use the ho
9
9
Applications may not use `NodePorts` or the `hostNetwork`.
10
10
11
11
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#access-control-service-type[access-control-service-type]
12
+
13
+
**Impacts and Risks of Non-Compliance:** NodePort services expose applications directly on host ports, creating security risks and potential port conflicts with host services.
Copy file name to clipboardExpand all lines: modules/k8s-best-practices-cloud-native-design-best-practices.adoc
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,13 @@ A container must provide APIs for the platform to observe the container health a
12
12
Lifecycle conformance::
13
13
A container must receive important events from the platform and conform/react to these events properly. For example, a container should catch SIGTERM or SIGKILL from the platform and shut down as quickly as possible. Other typically important events from the platform are PostStart to initialize before servicing requests and PreStop to release resources cleanly before shutting down.
14
14
15
-
See test cases link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#lifecycle-container-shutdown[lifecycle-container-shutdown], link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#lifecycle-container-startup[lifecycle-container-startup]
15
+
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#lifecycle-container-poststart[lifecycle-container-poststart]
16
+
17
+
**Impacts and Risks of Non-Compliance:** Missing PostStart hooks can cause containers to start serving traffic before proper initialization, leading to application errors.
18
+
19
+
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#lifecycle-container-prestop[lifecycle-container-prestop]
20
+
21
+
**Impacts and Risks of Non-Compliance:** Missing PreStop hooks can cause ungraceful shutdowns, data loss, and connection drops during container termination.
16
22
17
23
Image immutability::
18
24
Container images are meant to be immutable; i.e. customized images for different environments should typically not be built. Instead, an external means for storing and retrieving configurations that vary across environments for the container should be used. Additionally, the container image should NOT dynamically install additional packages at runtime.
Copy file name to clipboardExpand all lines: modules/k8s-best-practices-cnf-operator-requirements.adoc
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@
7
7
Operators should be certified against the openshift version of the cluster they will be deployed on.
8
8
9
9
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#affiliated-certification-operator-is-certified[affiliated-certification-operator-is-certified]
10
+
11
+
**Impacts and Risks of Non-Compliance:** Uncertified operators may have security flaws, compatibility issues, and lack enterprise support, creating operational risks.
10
12
====
11
13
12
14
.Workload requirement
@@ -19,6 +21,8 @@ Operators must be compatible with our version of openshift
19
21
* See link:https://sdk.operatorframework.io/docs/best-practices/[Redhat Operator SDK & Best Practices], link:https://olm.operatorframework.io/docs/best-practices/[OLM Best Practices]
20
22
21
23
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#platform-alteration-ocp-lifecycle[platform-alteration-ocp-lifecycle]
24
+
25
+
**Impacts and Risks of Non-Compliance:** End-of-life OpenShift versions lack security updates and support, creating significant security and operational risks.
22
26
====
23
27
24
28
.Workload requirement
@@ -27,6 +31,8 @@ See test case link:https://github.com/test-network-function/cnf-certification-te
27
31
Operators must be in OLM bundle format (Operator Framework).
28
32
29
33
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#operator-install-source[operator-install-source]
34
+
35
+
**Impacts and Risks of Non-Compliance:** Non-OLM operators bypass lifecycle management and dependency resolution, creating operational complexity and update issues.
30
36
====
31
37
32
38
.Workload requirement
@@ -47,6 +53,8 @@ All custom resources for operators require podspecs for both pod image override
47
53
Operators must not use daemonsets
48
54
49
55
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#lifecycle-pod-owner-type[lifecycle-pod-owner-type]
56
+
57
+
**Impacts and Risks of Non-Compliance:** Naked pods and DaemonSets lack proper lifecycle management, making updates, scaling, and recovery operations difficult or impossible.
50
58
====
51
59
52
60
.Workload requirement
@@ -87,6 +95,8 @@ For requesting Global operators (upstream 3rd party shared operators), the opera
87
95
Operators that are proprietary to a workload application must ensure that their CRD's are unique, and will not conflict with other operators in the cluster.
88
96
89
97
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#observability-crd-status[observability-crd-status]
98
+
99
+
**Impacts and Risks of Non-Compliance:** Missing status subresources prevent proper monitoring and automation based on custom resource states.
90
100
====
91
101
92
102
.Workload requirement
@@ -101,6 +111,8 @@ If a workload application requires a specific version of a third party non-propr
101
111
Successful operator installation and runtime must be validated in pre-deployment lab environments before being allowed to be deployed to production.
102
112
103
113
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#operator-install-status-succeeded[operator-install-status-succeeded]
114
+
115
+
**Impacts and Risks of Non-Compliance:** Failed operator installations can leave applications in incomplete states, causing functionality gaps and operational issues.
Copy file name to clipboardExpand all lines: modules/k8s-best-practices-cnf-securing-cnf-networks.adoc
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,4 +9,6 @@ Workloads must have the least permissions possible and must implement Network Po
9
9
Applications must define network policies that permit only the minimum network access the application needs to function.
10
10
11
11
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#networking-network-policy-deny-all[networking-network-policy-deny-all]
12
+
13
+
**Impacts and Risks of Non-Compliance:** Without default deny-all network policies, workloads are exposed to lateral movement attacks and unauthorized network access, compromising security posture and potentially enabling data breaches.
Copy file name to clipboardExpand all lines: modules/k8s-best-practices-cnf-security.adoc
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,9 @@ The general guidelines are:
18
18
====
19
19
Only ask for the necessary privileges and access control settings for your application
20
20
21
-
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#access-control-security-context-non-root-user-check[access-control-security-context-non-root-user-check]
21
+
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#access-control-security-context-non-root-user-id-check[access-control-security-context-non-root-user-id-check]
22
+
23
+
**Impacts and Risks of Non-Compliance:** Running containers as root increases the blast radius of security vulnerabilities and can lead to full host compromise if containers are breached.
22
24
====
23
25
24
26
.Workload requirement
@@ -28,6 +30,8 @@ If the function required by your workload can be fulfilled by OCP components, yo
28
30
requesting escalated privilege to perform this function.
29
31
30
32
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#access-control-security-context-privilege-escalation[access-control-security-context-privilege-escalation]
33
+
34
+
**Impacts and Risks of Non-Compliance:** Allowing privilege escalation can lead to containers gaining root access, compromising the security boundary between containers and hosts.
31
35
====
32
36
33
37
.Workload requirement
@@ -37,6 +41,8 @@ Avoid using any host system resource.
37
41
38
42
See test cases link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#access-control-pod-host-ipc[access-control-pod-host-ipc],
**Impacts and Risks of Non-Compliance:** Host IPC access allows containers to communicate with host processes, potentially exposing sensitive information and enabling privilege escalation.
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#access-control-pod-host-path[access-control-pod-host-path]
54
+
55
+
**Impacts and Risks of Non-Compliance:** Host path mounts can expose sensitive host files to containers, enable container escape attacks, and compromise host system integrity.
48
56
====
49
57
50
58
.Workload requirement
@@ -53,6 +61,8 @@ See test case link:https://github.com/test-network-function/cnf-certification-te
53
61
Do not use host network namespace.
54
62
55
63
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#access-control-namespace[access-control-namespace]
64
+
65
+
**Impacts and Risks of Non-Compliance:** Using inappropriate namespaces can lead to resource conflicts, security boundary violations, and administrative complexity in multi-tenant environments.
56
66
====
57
67
58
68
.Workload requirement
@@ -61,4 +71,6 @@ See test case link:https://github.com/test-network-function/cnf-certification-te
61
71
Workloads may not modify the platform in any way.
62
72
63
73
See test cases link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#platform-alteration-base-image[platform-alteration-base-image], link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#platform-alteration-sysctl-config[platform-alteration-sysctl-config]
74
+
75
+
**Impacts and Risks of Non-Compliance:** Modified base images can introduce security vulnerabilities, create inconsistent behavior, and violate immutable infrastructure principles.
Copy file name to clipboardExpand all lines: modules/k8s-best-practices-container-runtime.adoc
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,8 @@ Images should be OCI compliant. Red Hat recommends that you build images using R
11
11
See <<k8s-best-practices-ubi>> for additional information about UBI and support.
12
12
13
13
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#platform-alteration-isredhat-release[platform-alteration-isredhat-release]
14
+
15
+
**Impacts and Risks of Non-Compliance:** Non-Red Hat base images may lack security updates, enterprise support, and compliance certifications required for production use.
14
16
====
15
17
16
18
For more information about CRI-O, see the following:
Copy file name to clipboardExpand all lines: modules/k8s-best-practices-cpu-isolation.adoc
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,5 +11,7 @@ Device interrupts are load balanced between all isolated and reserved CPUs to av
11
11
To use isolated CPUs, specific annotations must be defined in the pod specification.
12
12
13
13
See test case link:https://github.com/test-network-function/cnf-certification-test/blob/main/CATALOG.md#lifecycle-cpu-isolation[lifecycle-cpu-isolation]
14
+
15
+
**Impacts and Risks of Non-Compliance:** Improper CPU isolation can cause performance interference between workloads and fail to provide guaranteed compute resources.
0 commit comments