CKAD Services and Networking • Complete Question Bank
Complete CKAD Services and Networking question bank — all 0 questions with answers and detailed explanations.
Refer to the exhibit.
```yaml
apiVersion: v1
kind: Service
metadata:
name: my-service
spec:
type: NodePort
selector:
app: my-app
ports:
- port: 80
targetPort: 8080
nodePort: 30007
```Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag a concept onto its matching description — or click a concept then click the description.
API version of the resource (e.g., apps/v1)
Desired number of pod instances
Labels used to identify pods managed by the deployment
Labels assigned to pods created by the template
Container image to run
Drag a concept onto its matching description — or click a concept then click the description.
Runs before app containers; for setup tasks
Helper container that runs alongside the main container
Pod managed directly by the kubelet without API server
Temporary container for debugging running pods
Pod with multiple containers sharing the same network and storage
An Ingress resource has the following spec. What is the effect?
spec: tls: - hosts: - myapp.example.com secretName: myapp-tls rules: - host: myapp.example.com http: paths: - path: / pathType: Prefix backend: service: name: myapp port: number: 80
An ingress resource is created with the following spec. Which request will be routed to the 'green' service?
```yaml spec: rules: - host: example.com http: paths: - path: /api pathType: Prefix backend: service: name: blue port: number: 80 - path: /api/v1 pathType: Exact backend: service: name: green port: number: 80 ```
You apply the following Ingress manifest:
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: app-ingress spec: ingressClassName: nginx rules: - host: example.com http: paths: - path: /api pathType: Prefix backend: service: name: api-service port: number: 80
The Ingress controller logs show a 404 error when accessing 'http://example.com/api'. The service 'api-service' exists and is reachable via ClusterIP. What is the most likely cause?
An admin applies the following NetworkPolicy:
apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: deny-all spec: podSelector: {} policyTypes: - Ingress - Egress
What effect does this policy have?
An Ingress resource has the following spec:
spec: rules: - host: example.com http: paths: - path: /api pathType: Prefix backend: service: name: api-service port: number: 80
What will the Ingress controller do for a request to http://example.com/api/v1/users?
A developer runs 'kubectl run nginx --image=nginx --port=80' and then creates a Service with the following YAML:
apiVersion: v1 kind: Service metadata: name: nginx-svc spec: selector: app: nginx ports: - protocol: TCP port: 80 targetPort: 80
However, the Service has no endpoints. What is the most likely cause?
Given the following NetworkPolicy YAML:
apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: deny-all spec: podSelector: {} policyTypes: - Ingress - Egress
What is the effect of this policy?
An Ingress resource is created with the following YAML:
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: my-ingress spec: rules: - host: example.com http: paths: - path: /api pathType: Prefix backend: service: name: api-svc port: number: 80
Which of the following requests will be routed to the api-svc Service?
You apply the following NetworkPolicy:
apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: deny-all spec: podSelector: {} policyTypes: - Ingress - Egress
After applying, pods in the namespace cannot reach the kube-dns service. What is the most likely reason?
You have an Ingress with the following spec:
spec: rules: - host: app.example.com http: paths: - path: /api pathType: Prefix backend: service: name: api-service port: number: 80
How does the Ingress controller route a request to http://app.example.com/api/v1/users?
An administrator applies the following NetworkPolicy:
apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: deny-all spec: podSelector: {} policyTypes: - Ingress - Egress
After applying this policy, which traffic flows are affected?