SV-242383r712505_rule
V-242383
SRG-APP-000038-CTR-000105
CNTR-K8-000290
CAT I
10
Move any user-managed resources from the default, kube-public and kube-node-lease namespaces, to user namespaces.
To view the available namespaces, run the command:
kubectl get namespaces
The default namespaces to be validated are default, kube-public and kube-node-lease if it is created.
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 valid return values are the kubernetes service (i.e., service/kubernetes) and nothing at all.
If a return value is returned from the "kubectl get all" command and it is not the kubernetes service (i.e., service/kubernetes), this is a finding.
V-242383
False
CNTR-K8-000290
To view the available namespaces, run the command:
kubectl get namespaces
The default namespaces to be validated are default, kube-public and kube-node-lease if it is created.
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 valid return values are the kubernetes service (i.e., service/kubernetes) and nothing at all.
If a return value is returned from the "kubectl get all" command and it is not the kubernetes service (i.e., service/kubernetes), this is a finding.
M
5376