CKAD EXAM 2

1 / 10

Question:

You are tasked with deploying a multi-container pod that hosts a web server and a sidecar container responsible for logging. The pod must meet the following requirements:

  • It must run in the production namespace (already created).
  • The main container should use the nginx:latest image and expose port 80.
  • The sidecar container should use the busybox image with the 1.28 tag and run a command that writes logs to /var/log/log.txt every 10 seconds.
  • The pod should have the name webserver-logger.
  • The sidecar container must have resource limits set to 100m CPU and 50Mi memory.

Which of the following YAML manifests will correctly define the pod with the specified requirements?

2 / 10

Question

You are assigned to configure a Kubernetes environment for a database application with specific reliability and security requirements. The database should meet the following requirements:

  • The application must use PostgreSQL 13 in a highly available setup.
  • The application must have two replicas running for high availability.
  • Data persistence must be implemented using Persistent Volumes.
  • The database must be deployed in a secure namespace called db-secure.
  • Secrets must be used for sensitive information (database username and password).
  • The database deployment must expose port 5432 only within the cluster using a ClusterIP service.

Which of the following YAML manifests correctly meets all the stated requirements?

3 / 10

You are assigned to configure a Kubernetes deployment for a simple web application with specific requirements. The application should meet the following criteria:

  • The web application should run in the default namespace.
  • The deployment must use the nginx:latest image.
  • It should run 3 replicas for high availability.
  • The application must expose port 80 for HTTP traffic.
  • Health checks must be implemented to ensure availability by using a liveness probe. The liveness probe should check if the application responds on port 80 every 10 seconds.
  • Resource limits must be applied to prevent resource starvation, with requests set to 100m CPU and 256Mi memory and limits set to 200m CPU and 512Mi memory.

Which of the following YAML manifests will meet the specified requirements?

4 / 10

Question

You need to create a Kubernetes ConfigMap to store configuration settings for a web application. The application expects the following key-value pairs:

  • APP_ENV=production
  • APP_DEBUG=false
  • APP_PORT=8080

Which of the following YAML manifests will correctly create a ConfigMap with these settings?

5 / 10

Question

You need to create a Kubernetes ConfigMap to store configuration settings for a web application. The application expects the following key-value pairs:

  • APP_ENV=production
  • APP_DEBUG=false
  • APP_PORT=8080

Which of the following YAML manifests will correctly create a ConfigMap with these settings?

6 / 10

Question

You are deploying a new application in a Kubernetes cluster and need to ensure that its configuration is version-controlled and easily reusable. You decide to use a ConfigMap to store non-sensitive configuration data like application settings and environment variables.

You want to create a ConfigMap with the following properties:

  • Name: app-config
  • Namespace: default
  • Contains the following data:
    • APP_ENV=production
    • APP_LOG_LEVEL=debug

Which of the following YAML manifests will correctly create this ConfigMap?

7 / 10

Question

You are managing a Kubernetes cluster with multiple namespaces. You need to ensure that only certain users can deploy, delete, or edit specific applications in the finance namespace, while other users are restricted from making unauthorized changes.

You decide to use Role-Based Access Control (RBAC) for fine-grained access control. Based on the requirement, you need to create a Role and a RoleBinding to ensure that only members of the finance-team group can create, delete, and update deployments in the finance namespace.

Which of the following YAML manifests will accomplish this requirement?

8 / 10

Question

You are configuring a Kubernetes Ingress resource to expose a web application that runs on service web-service in the default namespace. The application listens on port 80, and you need to ensure it can be accessed using the domain name example.com.

Which of the following manifests will correctly configure an Ingress to meet these requirements?

9 / 10

Question

You are responsible for configuring Resource Requests and Limits for a stateful database application running on Kubernetes. The database application requires the following:

  • Minimum CPU request of 500m.
  • Minimum memory request of 1Gi.
  • CPU limit of 1 core.
  • Memory limit of 2Gi.

You must ensure that the application can scale properly without risking overconsumption of cluster resources.

Which of the following YAML manifests correctly configures a StatefulSet to meet these resource requirements?

10 / 10

You are tasked with configuring a Kubernetes Deployment for a Node.js application. The application must meet the following requirements:

  • It should have 3 replicas running at all times.
  • It should use the image node:14.
  • The application should listen on port 3000.
  • A liveness probe should be defined to check that the application is alive by hitting /healthz.
  • The application must restart if it becomes unresponsive.

Which of the following manifests will meet the specified requirements?

Your score is

The average score is 0%

0%