SV-254570r1137645_rule
V-254570
SRG-APP-000243-CTR-000600
CNTR-R2-000970
CAT II
10
System namespaces are reserved and isolated.
A resource cannot move to a new namespace; the resource must be deleted and recreated in the new namespace.
kubectl delete <resource_type> <resource_name>
kubectl create -f <resource.yaml> --namespace=<user_created_namespace>
System namespaces are reserved and isolated.
To view the available namespaces, run the command:
kubectl get namespaces
The namespaces to be validated include:
default
kube-public
kube-system
kube-node-lease
For the default namespace, execute the commands:
kubectl config set-context --current --namespace=default
kubectl get all
For the kube-public namespace, execute the commands:
kubectl config set-context --current --namespace=kube-public
kubectl get all
For the kube-node-lease namespace, execute the commands:
kubectl config set-context --current --namespace=kube-node-lease
kubectl get all
The only return values are the Kubernetes service objects (e.g., service/kubernetes).
For the kube-system namespace, execute the commands:
kubectl config set-context --current --namespace=kube-system
kubectl get all
The values returned include the following resources:
- ETCD
- Helm
- Kubernetes API Server
- Kubernetes Controller Manager
- Kubernetes Proxy
- Kubernetes Scheduler
- Kubernetes Networking Components
- Ingress Controller Components
- Metrics Server
If a return value from the "kubectl get all" command is not the Kubernetes service, one from the above lists, or a service otherwise approved by your Information Systems Security Officer (ISSO), this is a finding.
V-254570
False
CNTR-R2-000970
System namespaces are reserved and isolated.
To view the available namespaces, run the command:
kubectl get namespaces
The namespaces to be validated include:
default
kube-public
kube-system
kube-node-lease
For the default namespace, execute the commands:
kubectl config set-context --current --namespace=default
kubectl get all
For the kube-public namespace, execute the commands:
kubectl config set-context --current --namespace=kube-public
kubectl get all
For the kube-node-lease namespace, execute the commands:
kubectl config set-context --current --namespace=kube-node-lease
kubectl get all
The only return values are the Kubernetes service objects (e.g., service/kubernetes).
For the kube-system namespace, execute the commands:
kubectl config set-context --current --namespace=kube-system
kubectl get all
The values returned include the following resources:
- ETCD
- Helm
- Kubernetes API Server
- Kubernetes Controller Manager
- Kubernetes Proxy
- Kubernetes Scheduler
- Kubernetes Networking Components
- Ingress Controller Components
- Metrics Server
If a return value from the "kubectl get all" command is not the Kubernetes service, one from the above lists, or a service otherwise approved by your Information Systems Security Officer (ISSO), this is a finding.
M
5486