Pilih mode latihan, jawab setiap soal CKA, lalu tinjau penjelasannya. Jawaban salah disimpan secara lokal.
Hari beruntun: 0 hariTersimpan hanya di perangkat ini
Kemajuan0 / 60
Waktu tersisa: 00:00
Belum ada jawaban salah tersimpan.
Tidak ada soal yang cocok dengan filter.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.
Soal 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.