Question 11

Given an existing Pod named test-web-pod running in the namespace test-system Edit the existing Role bound to the Pod's Service Account named sa-backend to only allow performing get operations on endpoints.
Create a new Role named test-system-role-2 in the namespace test-system, which can perform patch operations, on resources of type statefulsets.
  • Question 12

    Enable audit logs in the cluster, To Do so, enable the log backend, and ensure that
    1. logs are stored at /var/log/kubernetes/kubernetes-logs.txt.
    2. Log files are retained for 5 days.
    3. at maximum, a number of 10 old audit logs files are retained.
    Edit and extend the basic policy to log:
  • Question 13

    SIMULATION
    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.
  • Question 14

    Using the runtime detection tool Falco, Analyse the container behavior for at least 30 seconds, using filters that detect newly spawning and executing processes
  • Question 15

    You can switch the cluster/configuration context using the following command:
    [desk@cli] $ kubectl config use-context qa
    Context:
    A pod fails to run because of an incorrectly specified ServiceAccount
    Task:
    Create a new service account named backend-qa in an existing namespace qa, which must not have access to any secret.
    Edit the frontend pod yaml to use backend-qa service account
    Note: You can find the frontend pod yaml at /home/cert_masters/frontend-pod.yaml