Question 36

Fix all issues via configuration and restart the affected components to ensure the new setting takes effect.
Fix all of the following violations that were found against the API server:- a. Ensure that the RotateKubeletServerCertificate argument is set to true.
b. Ensure that the admission control plugin PodSecurityPolicy is set.
c. Ensure that the --kubelet-certificate-authority argument is set as appropriate.
Fix all of the following violations that were found against the Kubelet:- a. Ensure the --anonymous-auth argument is set to false.
b. Ensure that the --authorization-mode argument is set to Webhook.
Fix all of the following violations that were found against the ETCD:-
a. Ensure that the --auto-tls argument is not set to true
b. Ensure that the --peer-auto-tls argument is not set to true
Hint: Take the use of Tool Kube-Bench

Question 37

Secrets stored in the etcd is not secure at rest, you can use the etcdctl command utility to find the secret value for e.g:-
  • Question 38

    SIMULATION
    Fix all issues via configuration and restart the affected components to ensure the new setting takes effect.
    Fix all of the following violations that were found against the API server:- a. Ensure that the RotateKubeletServerCertificate argument is set to true.
    b. Ensure that the admission control plugin PodSecurityPolicy is set.
    c. Ensure that the --kubelet-certificate-authority argument is set as appropriate.
    Fix all of the following violations that were found against the Kubelet:- a. Ensure the --anonymous-auth argument is set to false.
    b. Ensure that the --authorization-mode argument is set to Webhook.
    Fix all of the following violations that were found against the ETCD:-
    a. Ensure that the --auto-tls argument is not set to true
    b. Ensure that the --peer-auto-tls argument is not set to true
    Hint: Take the use of Tool Kube-Bench

    Question 39

    You can switch the cluster/configuration context using the following command: [desk@cli] $ kubectl config use-context stage Context: A PodSecurityPolicy shall prevent the creation of privileged Pods in a specific namespace. Task: 1. Create a new PodSecurityPolcy named deny-policy, which prevents the creation of privileged Pods. 2. Create a new ClusterRole name deny-access-role, which uses the newly created PodSecurityPolicy deny-policy. 3. Create a new ServiceAccount named psd-denial-sa in the existing namespace development. Finally, create a new ClusterRoleBindind named restrict-access-bind, which binds the newly created ClusterRole deny-access-role to the newly created ServiceAccount psp-denial-sa

    Question 40

    SIMULATION
    Create a Pod name Nginx-pod inside the namespace testing, Create a service for the Nginx-pod named nginx-svc, using the ingress of your choice, run the ingress on tls, secure port.