KCNA Kubernetes Fundamentals • Complete Question Bank
Complete KCNA Kubernetes Fundamentals question bank — all 0 questions with answers and detailed explanations.
Refer to the exhibit.
```
apiVersion: v1
kind: Pod
metadata:
name: web-pod
spec:
containers:
- name: web
image: nginx:1.21
ports:
- containerPort: 80
livenessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 3
periodSeconds: 5
```Refer to the exhibit. ``` $ kubectl get pods -n production NAME READY STATUS RESTARTS AGE web-0 1/1 Running 0 5m web-1 1/1 Running 0 5m web-2 0/1 Pending 0 5m $ kubectl describe pod web-2 -n production ... Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning FailedScheduling 5m default-scheduler 0/3 nodes are available: 3 node(s) didn't match pod anti-affinity rules. ```
apiVersion: v1
kind: Pod
metadata:
name: nginx-pod
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
livenessProbe:
httpGet:
path: /healthz
port: 80
initialDelaySeconds: 5
periodSeconds: 10
readinessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 3
periodSeconds: 5Drag a concept onto its matching description — or click a concept then click the description.
Constraints that attract pods to nodes based on node labels
Mechanism to repel pods from nodes unless they tolerate the taint
Minimum amount of CPU/memory guaranteed to a container
Maximum amount of CPU/memory a container can use
Indicates importance of a pod relative to others for preemption
A developer creates a Deployment with the following YAML snippet:
```yaml apiVersion: apps/v1 kind: Deployment spec: replicas: 3 selector: matchLabels: app: frontend template: metadata: labels: app: frontend spec: containers: - name: nginx image: nginx:1.21 ```
What will happen if the label 'app: frontend' is omitted from the pod template's metadata?
You apply the following YAML:
apiVersion: apps/v1 kind: Deployment metadata: name: web-deploy spec: replicas: 3 selector: matchLabels: app: web template: metadata: labels: app: web spec: containers: - name: nginx image: nginx:1.21
But the Deployment never creates any Pods. Which field is missing or incorrect?
Drag or tap steps into the slots.
Drag or tap steps into the slots.
Drag a concept onto its matching description — or click a concept then click the description.
Lightweight, standalone executable package that includes everything needed
Architectural style that structures an app as a collection of loosely coupled services
Automated configuration, coordination, and management of containers
Approach where servers are never modified after deployment; replaced instead
Specifying the desired state, letting the system achieve and maintain it
A developer creates a Pod with the following YAML snippet:
spec: containers: - name: web image: nginx ports: - containerPort: 80
The Pod is running, but the developer cannot reach it from another Pod in the same namespace using the Pod's IP address. Which command should the developer run first to verify that the container process is listening on port 80?
You are reviewing the manifest for a Pod that must only run on nodes with the label `disktype=ssd`. The manifest includes the following snippet:
```yaml nodeSelector: disktype: ssd ```
After applying the manifest, the Pod remains in Pending state indefinitely. `kubectl get nodes --show-labels` shows no node has the `disktype=ssd` label. Which action will allow the Pod to be scheduled without modifying the Pod's nodeSelector?