Latih 60 soalan Certified Kubernetes Administrator (CKA) asli merangkumi seni bina kluster, pemasangan, workload, penjadualan, perkhidmatan, rangkaian, penyimpanan, keselamatan dan penyelesaian masalah.
Tahap: Certified Kubernetes AdministratorKesukaran: intermediate60 soalan60 min
Pilih mod latihan, jawab setiap soalan CKA, kemudian semak penerangan. Jawapan salah disimpan setempat.
Hari berturut-turut: 0 hariDisimpan hanya pada peranti ini
Kemajuan0 / 60
Masa berbaki: 00:00
Belum ada jawapan salah disimpan.
Tiada soalan sepadan dengan penapis.
Soalan 1
What is Kubernetes?
Kubernetes is a portable container orchestration platform that automates deployment, scaling, and management of containerized applications. It is not a VM manager, database, or hardware appliance.
Soalan 2
What is a node in Kubernetes?
A node is a worker machine, either physical or virtual, where pods are scheduled and run. The control plane manages nodes and does not run user workloads directly.
Soalan 3
Which set of components manages the cluster?
The control plane includes the API server, scheduler, controller manager, and etcd. Worker nodes run pods, and volumes and ingress are workload resources.
Soalan 4
Which control plane component schedules pods onto nodes?
kube-scheduler assigns pods to nodes based on resources, constraints, and policies. kubelet runs on nodes, etcd stores state, and kube-proxy maintains network rules.
Soalan 5
Which component stores cluster state and configuration?
etcd is a distributed key-value store that holds cluster state. kubelet manages pods on a node, kube-proxy handles networking rules, and the runtime runs containers.
Soalan 6
Which component runs on every node and manages pods?
kubelet is the node agent that ensures containers in pods are running. The API server, scheduler, and controller manager are control plane components.
Soalan 7
What is kube-proxy responsible for?
kube-proxy maintains network rules that enable communication to Services from inside or outside the cluster. etcd stores state, the scheduler places pods, and CoreDNS provides DNS.
Soalan 8
Which tool is commonly used to bootstrap a Kubernetes cluster for the CKA exam?
kubeadm bootstraps a conformant Kubernetes cluster with kubeadm init and kubeadm join. kubectl talks to the API, helm packages charts, and kustomize manages manifests.
Soalan 9
What is a kubeconfig file?
kubeconfig stores connection details for clusters, users, and contexts so kubectl knows how to authenticate. It is not a manifest, storage class, or image.
Soalan 10
What does a context in a kubeconfig combine?
A context selects which cluster, user, and namespace kubectl uses by default. It does not combine nodes, pods, services, or ingresses.
Soalan 11
Which kubectl command shows cluster information?
kubectl cluster-info displays information about the cluster and its services. The other commands show secrets, drain nodes, or display resource usage.
Soalan 12
What is a namespace?
A namespace divides cluster resources into logical groups for isolation and management. It is not a server, image, or plugin.
Soalan 13
What is the smallest deployable unit in Kubernetes?
A pod is the smallest deployable unit and can contain one or more containers that share networking and storage. Containers run inside pods.
Soalan 14
Which workload controller runs a pod on every node?
A DaemonSet ensures that a copy of a pod runs on every node, which is useful for logging and monitoring agents. Deployments and StatefulSets manage a selected set of pods, and Jobs run to completion.
Soalan 15
Which workload controller is best for stateless applications that need rollouts and scaling?
A Deployment manages stateless apps with rolling updates, rollbacks, and scaling. StatefulSet is for stateful apps, DaemonSet runs on every node, and CronJob runs scheduled jobs.
Soalan 16
Which workload runs a finite task to completion?
A Job creates one or more pods and ensures they run until completion. Deployments run continuously, DaemonSets run on all nodes, and ReplicaSets maintain a replica count.
Soalan 17
Which workload runs jobs on a schedule?
A CronJob runs Jobs on a time-based schedule, similar to cron. Deployments and StatefulSets run continuous workloads, and Services expose pods.
Soalan 18
What does a ReplicaSet ensure?
A ReplicaSet maintains a desired number of identical pod replicas. DaemonSets run one per node, StatefulSets provide stable identity, and Services provide DNS and load balancing.
Soalan 19
Which pod field limits scheduling to nodes with matching labels?
nodeSelector schedules a pod only on nodes with specified labels. resources defines requests and limits, securityContext sets security options, and restartPolicy controls container restarts.
Soalan 20
What is a resource request?
A resource request tells the scheduler the minimum CPU and memory a container needs and helps it choose a node. Limits cap usage, labels select nodes, and affinity controls placement.
Soalan 21
What is a resource limit?
A resource limit caps CPU and memory usage for a container. Requests are minimum guarantees, quotas limit namespaces, and storage sizes are separate.
Soalan 22
What does a node taint do?
A taint marks a node so that only pods with a matching toleration can be scheduled there. It does not delete pods, scale replicas, or create volumes.
Soalan 23
What is a toleration?
A toleration lets a pod be scheduled on a node with a matching taint. It is not a limit, policy, or secret.
Soalan 24
What does a liveness probe check?
A liveness probe determines if a container is alive; if it fails, kubelet restarts the container. Readiness probes check if a pod should receive traffic, not whether it should be restarted.
Soalan 25
Which resource provides a stable IP and DNS name for a set of pods?
A Service provides stable networking for pods and load balances traffic. Ingress routes HTTP traffic to Services, ConfigMap holds config, and PersistentVolume provides storage.
Soalan 26
Which Service type exposes a port on every node?
NodePort exposes a Service on a static port on every node, making it reachable from outside the cluster. ClusterIP is internal, LoadBalancer provisions a cloud load balancer, and ExternalName maps a DNS name.
Soalan 27
Which Service type provisions a cloud load balancer?
A LoadBalancer Service provisions an external load balancer from the cloud provider. NodePort exposes node ports, ClusterIP is internal, and a headless Service has no cluster IP.
Soalan 28
Which resource routes HTTP and HTTPS traffic to Services?
An Ingress exposes HTTP and HTTPS routes from outside the cluster to Services. ConfigMap holds config, namespaces partition resources, and ServiceAccounts identify pods.
Soalan 29
What is a ClusterIP?
ClusterIP is the default Service IP, reachable only from inside the cluster. Public IPs and node IPs are external, and ingress uses its own routing rules.
Soalan 30
What is the DNS name for a Service in the cluster?
Kubernetes DNS resolves Service names as service.namespace.svc.cluster.local. The other forms are not valid DNS patterns.
Soalan 31
Which type of plugin provides pod networking?
A CNI plugin such as Calico or Flannel implements pod networking. CSI plugins provide storage, ingress controllers route HTTP, and storage classes define storage types.
Soalan 32
What is a PersistentVolume?
A PersistentVolume is storage provisioned at the cluster level and consumed by pods through claims. Temporary filesystems and ConfigMaps do not provide durable storage.
Soalan 33
What is a PersistentVolumeClaim?
A PVC requests storage of a certain size and class and binds to a PersistentVolume. It is not the storage itself, a class, backup, or snapshot.
Soalan 34
Which resource enables dynamic provisioning of volumes?
A StorageClass defines provisioner and parameters for dynamically creating PersistentVolumes. PersistentVolume is static storage, and namespaces and ingress are not storage resources.
Soalan 35
What is a ConfigMap used for?
A ConfigMap stores non-sensitive configuration such as environment variables and files. Secrets store sensitive data, volumes provide storage, and NetworkPolicies filter traffic.
Soalan 36
What is a Secret used for?
A Secret stores sensitive data such as passwords, tokens, and keys. ConfigMaps store non-sensitive config, and DNS and scheduling are handled by other components.
Soalan 37
Which resource defines permissions for users and service accounts in a namespace?
A Role defines permissions within a namespace. ClusterRoleBinding binds cluster-wide roles, PersistentVolume provides storage, and NetworkPolicy filters traffic.
Soalan 38
Which resource binds a Role to a user or ServiceAccount?
A RoleBinding grants the permissions in a Role to a subject such as a user or ServiceAccount. Secrets, ConfigMaps, and DaemonSets do not bind roles.
Soalan 39
What is a ServiceAccount?
A ServiceAccount provides an identity for pods when they call the Kubernetes API. It is not an SSH login, storage account, or network Service.
Soalan 40
Which feature can drop Linux capabilities for a container?
securityContext controls privileges, capabilities, and user IDs for a pod or container. nodeSelector places pods, quotas limit resources, and HPA scales replicas.
Soalan 41
What is a NetworkPolicy?
A NetworkPolicy defines which pods can communicate with each other based on labels and ports. It is not a DNS, backup, or storage policy.
Soalan 42
Which command shows logs from a pod?
kubectl logs prints container logs from a pod. top shows resource usage, apply applies manifests, and rollout manages deployment updates.
Soalan 43
Which command shows detailed information about a resource?
kubectl describe shows detailed status and events for a resource. get events lists events, exec runs commands in a container, and scale changes replica counts.
Soalan 44
Which command lists cluster events?
kubectl get events lists recent cluster events, useful for troubleshooting. The other commands describe secrets, show node usage, and mark nodes unschedulable.
Soalan 45
Which command runs a command inside a running container?
kubectl exec runs a command in an existing container, such as kubectl exec pod -it -- /bin/sh. run creates a pod, create creates resources, and expose creates a Service.
Soalan 46
What does kubectl drain do?
kubectl drain evicts pods from a node safely so maintenance can be performed. It does not delete the cluster, restart the API server, or create backups.
Soalan 47
What does kubectl cordon do?
kubectl cordon marks a node unschedulable so new pods are not placed there, while existing pods keep running. It does not delete the node or restart pods, and taints are set separately.
Soalan 48
Which command applies a manifest to the cluster?
kubectl apply -f applies configuration from a file or directory. logs prints logs, drain evicts pods, and top shows resource usage.
Soalan 49
Which command deletes a resource?
kubectl delete removes resources such as pods, deployments, and services. create adds resources, describe shows details, and edit modifies resources.
Soalan 50
Which command shows pods in all namespaces?
kubectl get pods -A lists pods across all namespaces. get nodes lists nodes, get svc lists Services, and get ns lists namespaces.
Soalan 51
Which controller manager runs controllers such as node and replication controllers?
kube-controller-manager runs built-in controllers for nodes, replicas, endpoints, and more. The scheduler places pods, cloud-controller-manager handles cloud APIs, and kubelet runs on nodes.
Soalan 52
What is a StatefulSet used for?
A StatefulSet gives stateful workloads stable network identity and persistent storage. DaemonSets run everywhere, Jobs run batches, and Services expose networking.
Soalan 53
What is pod affinity used for?
Pod affinity and anti-affinity control placement relative to other pods using labels. Resource limits, secret encryption, and volumes are separate concerns.
Soalan 54
What does a HorizontalPodAutoscaler do?
An HPA adjusts the number of pod replicas based on metrics such as CPU or custom metrics. It does not scale nodes, storage, or DNS.
Soalan 55
What is a headless Service?
A headless Service sets clusterIP: None so DNS returns pod IPs directly, useful for stateful workloads. It still exists and can be deleted; it is not a traffic blocker.
Soalan 56
What does kubectl top show?
kubectl top displays CPU and memory usage for nodes or pods when metrics are available. It does not show DNS, deployments, or logs.
Soalan 57
Which of the following are control plane components? Select all that apply.
kube-apiserver, kube-scheduler, and etcd are control plane components. kubelet runs on worker nodes and manages pods.
Soalan 58
Which of the following are workload controllers? Select all that apply.
Deployment, DaemonSet, and Job are workload controllers. A pod is the unit they manage, not a controller itself.
Soalan 59
kubectl drain permanently removes a node from the cluster.
kubectl drain evicts pods so a node can be maintained, but it does not permanently remove the node from the cluster. Deleting the node object is a separate operation.
Soalan 60
Match each kubectl command to its purpose.
kubectl get lists resources, describe shows detailed status, logs prints container logs, and exec runs commands inside a container.