Search test library by skills or roles
⌘ K

Adaface Sample Kubernetes Questions

Here are some sample Kubernetes questions from our premium questions library (10273 non-googleable questions).

Skills

🧐 Question

Medium

ConfigMap and Secrets Interaction
Resource Management
Security
Solve
In a Kubernetes cluster, you are working on configuring a new deployment that should be able to access specific environment variables through both ConfigMap and Secrets resources. The deployment YAML is structured as follows:
 image
You have applied the above YAML successfully without any errors. Now, you are about to configure a service to expose the deployment. Before doing that, you want to confirm the security and setup implications.
            
            Based on the above configuration, which of the following statements are true?
1. The DATABASE_PASSWORD will be mounted as an environment variable in plain text.
            2. The ConfigMap data can be updated and the changes will be reflected automatically in the running pods without any need for a redeployment.
            3. If a potential attacker gains access to the cluster, they would be able to retrieve the DATABASE_PASSWORD in plain text from the secrets resource as it is defined in stringData.
            4. The APP_ENV and DATABASE_URL values are securely stored and cannot be accessed by non-admin users.
            5. If a new container in the same pod is created, it would automatically have the DATABASE_PASSWORD environment variable configured.

Medium

Ingress from namespace
Network
Network Policies
Solve
You are tasked with deploying a Kubernetes network policy. Here are the specifications:
            
            - Name of the policy: adaface-namespace
            - Policy to be deployed in ‘chatbot’ namespace
            - The policy should allow ALL traffic only from ‘tester’ namespace
            - Policy should not allow communication between pods in the same namespace
            - Traffic only from ‘tester’ namespace is allowed on all ports
Which of the following configuration files is BEST suited to create required dependencies and deploy the network policy?
 image

Medium

Pod Affinity and Resource Quota Compliance
Pod Scheduling
Resource Management
Solve
You are working on a Kubernetes project where you need to ensure that certain pods get scheduled on nodes based on the presence of other pods and to limit the amount of resources that can be consumed in a namespace. You have been given the following YAML file which contains a combination of a pod definition and a resource quota:
 image
With the application of the above YAML configuration, assess the validity of the statements and choose the correct option that lists all the true statements.
1. The critical-pod will only be scheduled on nodes where at least one pod with a label security=high is already running.
            2. The critical-pod is adhering to the resource quotas defined in the compute-quota.
            3. The compute-quota restricts the namespace to only allow a total of 1 CPU and 1Gi memory in requests and 2 CPUs and 2Gi memory in limits across all pods.
            4. If a node has multiple pods labeled with security=high, the critical-pod can potentially be scheduled on that node, given other scheduling constraints are met.
            5. The critical-pod exceeds the defined memory request quota as per the compute-quota.

Easy

Resource limits
Pods
Containers
Solve
How would you deploy a Kubernetes pod with the following specifications:
            
            - Name of pod: adaface
            - Resource limits: 1 CPU and 512Mi memory
            - Image: haproxy
A: kubectl run adaface --image=haproxy --limits='cpu=1,memory=512Mi'
            B: kubectl run adaface --image=haproxy --requests='cpu=1,memory=512Mi'
 image
🧐 Question🔧 Skill

Medium

ConfigMap and Secrets Interaction
Resource Management
Security

2 mins

Kubernetes
Solve

Medium

Ingress from namespace
Network
Network Policies

3 mins

Kubernetes
Solve

Medium

Pod Affinity and Resource Quota Compliance
Pod Scheduling
Resource Management

2 mins

Kubernetes
Solve

Easy

Resource limits
Pods
Containers

3 mins

Kubernetes
Solve
🧐 Question🔧 Skill💪 Difficulty⌛ Time
ConfigMap and Secrets Interaction
Resource Management
Security
Kubernetes
Medium2 mins
Solve
Ingress from namespace
Network
Network Policies
Kubernetes
Medium3 mins
Solve
Pod Affinity and Resource Quota Compliance
Pod Scheduling
Resource Management
Kubernetes
Medium2 mins
Solve
Resource limits
Pods
Containers
Kubernetes
Easy3 mins
Solve

Trusted by recruitment teams in enterprises globally

Amazon Morgan Stanley Vodafone United Nations HCL PayPal Bosch WeWork Optimum Solutions Deloitte Microsoft NCS Doubtnut Sokrati J&T Express Capegemini

We evaluated several of their competitors and found Adaface to be the most compelling. Great library of questions that are designed to test for fit rather than memorization of algorithms.


Swayam Narain, CTO, Affable

hashtag image heart icon Swayam
customers across world
Join 1200+ companies in 75+ countries.
Try the most candidate friendly skills assessment tool today.
g2 badges
Ready to streamline your recruitment efforts with Adaface?
Ready to streamline your recruitment efforts with Adaface?
logo
40 min tests.
No trick questions.
Accurate shortlisting.
ada
Ada
● Online
Previous
Score: NA
Next
✖️