Question 6

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 the --authorization-mode argument includes RBAC b. Ensure the --authorization-mode argument includes Node c. Ensure that the --profiling argument is set to false 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
Hint: Take the use of Tool Kube-Bench

Question 7

use the Trivy to scan the following images,
  • Question 8

    SIMULATION
    Create a PSP that will prevent the creation of privileged pods in the namespace.
    Create a new PodSecurityPolicy named prevent-privileged-policy which prevents the creation of privileged pods.
    Create a new ServiceAccount named psp-sa in the namespace default.
    Create a new ClusterRole named prevent-role, which uses the newly created Pod Security Policy prevent-privileged-policy.
    Create a new ClusterRoleBinding named prevent-role-binding, which binds the created ClusterRole prevent-role to the created SA psp-sa.
    Also, Check the Configuration is working or not by trying to Create a Privileged pod, it should get failed.

    Question 9

    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 10

    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.