CKS Exam Question 21

Create a network policy named restrict-np to restrict to pod nginx-test running in namespace testing.
Only allow the following Pods to connect to Pod nginx-test:-
1. pods in the namespace default
2. pods with label version:v1 in any namespace.
Make sure to apply the network policy.
  • CKS Exam Question 22

    Context
    The kubeadm-created cluster's Kubernetes API server was, for testing purposes, temporarily configured to allow unauthenticated and unauthorized access granting the anonymous user duster-admin access.
    Task
    Reconfigure the cluster's Kubernetes API server to ensure that only authenticated and authorized REST requests are allowed.
    Use authorization mode Node,RBAC and admission controller NodeRestriction.
    Cleaning up, remove the ClusterRoleBinding for user system:anonymous.

    CKS Exam Question 23

    use the Trivy to scan the following images,
  • CKS Exam Question 24

    Service is running on port 389 inside the system, find the process-id of the process, and stores the names of all the open-files inside the /candidate/KH77539/files.txt, and also delete the binary.

    CKS Exam Question 25

    Create a new ServiceAccount named backend-sa in the existing namespace default, which has the capability to list the pods inside the namespace default.
    Create a new Pod named backend-pod in the namespace default, mount the newly created sa backend-sa to the pod, and Verify that the pod is able to list pods.
    Ensure that the Pod is running.