SaveMyCert
Log in
5 of 5 free questions left today·for 10 a day
KCSA quick-recall

KCSA flashcards

Flip through 13 cards — one per KCSA topic — and self-test the key exam facts. Free, no account needed. These exams reward fast recognition, which is exactly what flashcards train.

1 / 13

Every KCSA flashcard, by exam domain

128 key facts across 6 domains — the full deck below, so you can scan it even without the interactive cards.

Overview of Cloud Native Security

14% of the exam
  • The 4Cs are Cloud, Cluster, Container and Code; place a control by where it is configured, not by what it protects.
  • Each layer builds on the one around it, so strong application code cannot make up for a weak cloud account or cluster.
  • Responsibility follows operation: on a managed service the provider runs the control plane, but RBAC, workloads and self-managed nodes stay with the customer; a self-installed cluster puts the whole control plane on the customer.
  • Keep the API endpoint off the internet and limit it to administrative sources; this is an extra layer beside authentication and RBAC, not a replacement.
  • Nodes should accept only control-plane traffic on the needed ports (kubelet 10250) plus NodePort and LoadBalancer Service traffic.
  • Give the control plane and nodes only the cloud permissions their own components use, block Pod access to the metadata endpoint, and use workload identity instead of node credentials or stored keys.
  • Only the API server should connect to etcd, over mutual TLS, and etcd's storage should be encrypted because it holds every Secret.
  • Preventive controls stop a bad state, detective controls notice it and corrective controls restore a good state; defence in depth needs independent controls in several layers.
  • The CIS Kubernetes Benchmark is the per-setting hardening baseline that kube-bench checks; the CNCF lifecycle phases are Develop, Distribute, Deploy and Runtime.
  • Standard containers share the host kernel, so a kernel vulnerability is a risk shared by every workload on the node.
  • Namespaces control what a process sees, cgroups control how much it uses; neither gives a container its own kernel.
  • A Kubernetes namespace scopes names, RBAC, quotas and policies, but Pods in different namespaces can talk by default and cluster-scoped objects (Nodes, PersistentVolumes, ClusterRoles) sit outside it.
  • Taints keep other Pods off a dedicated pool; node affinity or a nodeSelector keeps the sensitive Pods on it. You need both.
  • gVisor intercepts system calls in a user-space kernel, Kata Containers runs each Pod in a lightweight VM; select either per Pod with runtimeClassName and apply them selectively because of overhead and compatibility.
  • Isolation strength runs from namespace to dedicated nodes to sandboxed runtime to separate clusters on separate VMs; the scenario's cost or trust constraint decides.
  • Distroless or scratch bases and multi-stage builds shrink what an image contains; signing and registry controls protect provenance and integrity, not contents.
  • Scan in CI and rescan on a schedule, and reference production images by digest so the reviewed build is what runs.
  • A signature proves publisher and integrity, not the absence of vulnerabilities; mirror approved images into a private registry to control their source.
  • Secrets in a layer, ENV or build argument stay recoverable; use BuildKit secret mounts at build time and Kubernetes Secrets at run time, and set a non-root USER in the image.

Kubernetes Cluster Component Security

22% of the exam
  • The API server checks every request in the order authentication, authorization, admission; only admission sees the object's content.
  • Requests without credentials become system:anonymous in system:unauthenticated, never system:authenticated, and get only what is bound to them.
  • AlwaysAllow makes every valid credential a cluster administrator; production runs Node,RBAC, and dropping Node breaks kubelets.
  • NodeRestriction limits a kubelet to its own Node and Pods, and labels under node-restriction.kubernetes.io/ cannot be set by kubelets.
  • Use mutual TLS to etcd, and set --kubelet-certificate-authority only after kubelets have CA-signed serving certificates.
  • The service account signing key mints tokens and the cluster CA key mints superuser certificates; lock both down and rotate the signing key with an overlap.
  • Give the controller manager per-controller service accounts, and bind it and the scheduler to 127.0.0.1 with profiling off.
  • A compromised scheduler decides where Pods run; it reaches cluster state only through the API server.
  • Write access to etcd is root on the cluster: allow its client port only from the API server, and give other tools API access instead.
  • Encrypt Secrets at rest (KMS v2 preferred), rewrite existing Secrets after enabling it, and keep backups encrypted and away from their keys.
  • Turn kubelet anonymous authentication off; when it is on, credential-less requests become system:anonymous in system:unauthenticated and only RBAC bindings decide what they get.
  • Run kubelets with Webhook authorization: AlwaysAllow lets any valid token, even a stolen low-privilege one, run commands in every container on the node.
  • Kubelet paths map to nodes subresources; get on nodes/proxy can execute commands, so monitoring needs only nodes/metrics and nodes/stats.
  • The read-only port serves Pod details over HTTP with no checks and is not covered by anonymous-auth; set readOnlyPort: 0.
  • The kubelet calls containerd or CRI-O over CRI, which calls runc; the runtime socket is root on the node, and runtime CVEs are fixed by patching every node.
  • kube-proxy runs as a privileged host-network DaemonSet that programs Service forwarding; keep metrics on 127.0.0.1 and use nodePortAddresses to keep NodePorts off public interfaces.
  • runAsNonRoot is a check enforced by the kubelet at start; pair it with a non-zero runAsUser. allowPrivilegeEscalation: false is inconsistent with privileged (rejected by the API server) and with SYS_ADMIN, so remove those to keep no_new_privs.
  • Drop ALL capabilities and add back only what is needed; set seccomp RuntimeDefault, because unset means Unconfined.
  • readOnlyRootFilesystem stops even root from writing to the image; give writable paths an emptyDir.
  • Disable token automount for Pods that never call the API (the Pod setting overrides the ServiceAccount), avoid host namespaces, and use hostUsers: false for root-in-container images.
  • The Pod network is flat: any Pod can reach any Pod across nodes and namespaces until a NetworkPolicy, enforced by the CNI plugin, restricts it.
  • ClusterIP keeps a Service off external networks but is reachable from every Pod; the selector chooses backends, not allowed clients.
  • The container runtime runs the CNI plugin from /opt/cni/bin with config from /etc/cni/net.d as root, so write access to those paths is root on the node.
  • Kubernetes does not encrypt Pod-to-Pod traffic; use CNI node encryption, mesh mutual TLS or application TLS. Node encryption proves the sending node, not the workload.
  • Block Pods from 169.254.169.254 with an egress NetworkPolicy ipBlock except entry; the metadata API can hand out the node's cloud credentials.
  • A kubeconfig is a portable identity; never use insecure-skip-tls-verify, supply certificate-authority-data, and inspect untrusted files for exec plugins.
  • Client certificates cannot be revoked and there are no User objects; remove the bindings for the certificate's user name and groups, and prefer short-lived OIDC tokens with individual least-privilege identities.
  • super-admin.conf is in system:masters and bypasses RBAC, so keep it offline; admin.conf's access comes from a removable ClusterRoleBinding.
  • Baseline blocks hostPath in a Pod, but the right to create PersistentVolumes can reopen it through a hostPath PV and a claim.
  • Retain leaves data on Released volumes; ReadWriteOncePod limits a volume to one Pod; volume encryption comes from the StorageClass and CSI driver, not EncryptionConfiguration.

Kubernetes Security Fundamentals

22% of the exam
  • Privileged has no restrictions (trusted infrastructure), Baseline blocks known privilege escalations but admits default Pods, and Restricted applies current hardening for security-critical workloads.
  • Baseline forbids host namespaces, privileged containers, adding capabilities outside the default set (such as NET_ADMIN), hostPath volumes and an Unconfined seccomp profile; it allows root.
  • Restricted adds allowPrivilegeEscalation: false, runAsNonRoot, runAsUser not 0, an explicit RuntimeDefault or Localhost seccomp profile, drop ALL (add back only NET_BIND_SERVICE) and a short list of volume types.
  • A securityContext configures the runtime; a profile is a control-plane rule about which values are accepted. Pod Security Admission never mutates a Pod.
  • enforce rejects, audit annotates the audit log, warn returns a client warning; each mode is evaluated independently at its own level.
  • Levels are pod-security.kubernetes.io/<MODE>: <LEVEL> labels on the Namespace only; -version labels pin a release's definition or track latest.
  • Unlabelled namespaces fall back to AdmissionConfiguration defaults, which are privileged unless set; a namespace label overrides the default for that mode.
  • enforce checks only Pods, so a violating Deployment is created and its ReplicaSet records FailedCreate events; audit and warn also check Pod templates.
  • Exemptions (usernames, runtimeClasses, namespaces) live in the API server's AdmissionConfiguration; never exempt controller service accounts.
  • Roll out with kubectl label --dry-run=server, then an audit soak (dry runs miss CronJobs and scaled-to-zero workloads), then enforce; PSP was removed in v1.25 and PSA is its non-mutating replacement.
  • Kubernetes has no User objects: people are identified by client certificates, tokens or an OIDC provider, while service accounts are API objects.
  • 401 means the credential was not accepted; 403 means the identity was accepted but not authorized. Every authenticated identity is in system:authenticated.
  • A client certificate's CN is the user name and each O value is a group; system:masters bypasses RBAC and a certificate cannot be revoked, only expire.
  • Service accounts authenticate as system:serviceaccount:<ns>:<name> and are in system:serviceaccounts and system:serviceaccounts:<ns>.
  • Prefer TokenRequest tokens (kubectl create token, projected volumes): time-limited, audience-bound and tied to the Pod. Static token files and legacy token Secrets never expire.
  • The API server validates OIDC ID tokens itself, so a disabled user's existing token works until it expires, and claim prefixes such as oidc: change the group names RBAC sees.
  • Secret values are base64-encoded, not encrypted; list, watch and the right to create Pods all expose them. Scope access with a namespaced Role and resourceNames.
  • Secret volumes update in running Pods; subPath mounts and environment variables do not.
  • In an EncryptionConfiguration the first provider writes and identity means plain text; rotate keys by adding the new key second everywhere, then first everywhere.
  • Audit logging needs a policy file; the first matching rule sets the level, so log Secrets at Metadata early, and only blocking-strict fails a request whose RequestReceived event cannot be recorded.
  • A namespace scopes names; RBAC, ResourceQuota, LimitRange and NetworkPolicy provide the actual tenant isolation
  • ResourceQuota caps a namespace's totals at admission and never evicts running Pods; LimitRange sets per-container defaults and bounds
  • A CPU or memory quota makes requests or limits mandatory, and its rejections hit the ReplicaSet's Pods, not the Deployment
  • Pods are non-isolated until a policy selects them for a direction; ingress and egress isolation are independent
  • Policies are additive allow lists with no deny, no priority and no order; both the source's egress and the destination's ingress must allow a connection, and replies are implicit
  • Omitted policyTypes means Ingress always, plus Egress only if egress rules exist
  • podSelector: {} with a policyType and no rules is default deny for that namespace only; there is no cluster-wide default in the API
  • Peers in one from/to item are ANDed, separate items are ORed; a podSelector alone looks only in the policy's namespace; select namespaces with kubernetes.io/metadata.name
  • ipBlock is for cluster-external ranges; default-deny egress needs a DNS allow to kube-system on port 53 UDP and TCP
  • Only the network plugin enforces NetworkPolicy, including endPort; the API cannot log, do TLS, target Services by name or block node traffic

Kubernetes Threat Model

16% of the exam
  • A trust boundary is where data or requests pass to a more privileged component; namespaces, RBAC and NetworkPolicies are controls that defend boundaries, not boundaries themselves.
  • The API server is the only client of etcd, so direct etcd access skips authentication, RBAC, admission and audit logging.
  • By default the API server does not verify the kubelet's serving certificate; --kubelet-certificate-authority fixes that, and Konnectivity protects traffic across untrusted node networks.
  • API server proxy connections are plain HTTP by default; an https: prefix encrypts them but does not validate the endpoint's certificate.
  • Containers share the node's kernel; a RuntimeClass running gVisor or Kata Containers is the control that adds a separate kernel layer.
  • A static Pod survives kubectl delete of its mirror Pod; only deleting its manifest on the node removes it.
  • Controller-owned attacker Pods come back until the Deployment, DaemonSet or CronJob that owns them is deleted; mutating webhook configurations are a cluster-wide persistence point.
  • Deleting a legacy token Secret revokes that token; system:masters certificates bypass RBAC and cannot be revoked short of rotating the cluster CA.
  • Memory over the limit is OOMKilled, CPU over the limit is throttled; podPidsLimit caps a Pod's PIDs while systemReserved and kubeReserved PIDs protect daemons.
  • ResourceQuota is checked at admission and never removes existing Pods; priority-scoped quotas stop preemption abuse and FlowSchemas contain noisy API clients.
  • Code running in a container inherits exactly what its Pod holds: its service account token, volumes, Secrets, capabilities and network reach.
  • privileged: true, host namespaces, CAP_SYS_ADMIN and sensitive hostPath mounts are the main container-escape paths; hostPID shows the node's processes, hostNetwork its network, hostIPC its shared memory.
  • drop ALL removes default capabilities, allowPrivilegeEscalation: false sets no_new_privs against setuid gains, and neither replaces the other.
  • Mounting the node root, /var/lib/kubelet/pods or the container runtime socket exposes node credentials, neighbours' tokens or the whole node, bypassing the API server.
  • A service account token is a bearer credential worth exactly its RBAC; bound tokens limit theft through expiry, audience and Pod binding.
  • Secrets are only base64 in etcd until encryption at rest is configured; local providers keep the key in the config file, KMS v2 keeps it outside the cluster.
  • Without NetworkPolicy every Pod reaches every Pod and ClusterIP Service across namespaces; containment needs egress rules, and a 0.0.0.0/0 allow must except 169.254.169.254.
  • escalate, bind, impersonate, serviceaccounts/token and create on Pods are privilege-escalation permissions; Pod Security Admission does not stop a Pod borrowing a powerful service account in its namespace.
  • The Node authorizer confines a kubelet to its own node's Pods' objects and NodeRestriction limits what it can modify, so one compromised node exposes only its own Pods' Secrets.

Platform Security

16% of the exam
  • An SBOM lists components and versions (SPDX or CycloneDX); provenance records builder, source and build inputs; a signature proves which key or identity signed the image; a scan report lists CVEs known when it ran.
  • Stored SBOMs let a team find every image affected by a new CVE without pulling images; an old scan report cannot list a CVE published after it.
  • When a signing key is shared, only signed provenance from the CI builder proves an image came from CI and the expected repository.
  • In keyless signing, Fulcio issues a short-lived certificate from an OIDC identity and Rekor logs the event with a trusted timestamp, which is why signatures verify after the certificate expires.
  • Signatures only matter if an admission policy (Kyverno verifyImages, Sigstore policy-controller, Gatekeeper with external data) checks them, and that policy should rewrite the Pod to the verified digest because tags are mutable.
  • imagePullSecrets are resolved in the Pod's namespace; a ServiceAccount's imagePullSecrets are copied into its Pods; kubelet credential provider plugins fetch short-lived registry tokens on demand.
  • Nodes should pull with a pull-only account limited to the projects they need; tag immutability stops tags being overwritten, and scan-and-block stops vulnerable images being served.
  • AlwaysPullImages forces imagePullPolicy: Always so cached private images cannot be reused without credentials; NetworkPolicy cannot restrict registries because the node, not the Pod, pulls.
  • Mutating admission runs before validating admission, so validators see injected changes; admission never re-checks existing objects, reads or node-local restarts, so use Gatekeeper audit or Kyverno background scans.
  • failurePolicy Fail is fail-closed and Ignore fail-open, a timeout counts as a failure, and fail-closed webhooks should exclude their own namespace and kube-system to avoid lockout.
  • Pick the signal by what the attack changes: metrics for resource abuse, traces for one request across services, audit for Kubernetes API calls, runtime detection for processes inside containers.
  • Container logs are deleted with the Pod; a node agent must forward them to an external backend, using credentials that can append but not delete.
  • Falco watches system calls and alerts without blocking; seccomp, AppArmor or SELinux prevent, and a person or response tool acts on the alert.
  • Mesh mTLS encrypts traffic and authenticates both workloads through proxies; identity is a SPIFFE ID from namespace and ServiceAccount, so give each workload its own ServiceAccount.
  • Istio defaults to PERMISSIVE; STRICT PeerAuthentication rejects plaintext, so move every client into the mesh before enforcing it. DestinationRules configure only client proxies.
  • Mesh policy can match identity, method and path; NetworkPolicy works at L3/L4 and still applies if a container with NET_ADMIN bypasses its sidecar.
  • kubeadm uses separate cluster, etcd and front-proxy CAs; leaf certificates last one year and CAs ten, renewed by upgrades or kubeadm certs renew; kubelets rotate client certificates with rotateCertificates.
  • A stolen CA key means replacing the CA and reissuing every certificate, because Kubernetes cannot revoke client certificates.
  • kubeadm join pins the CA with --discovery-token-ca-cert-hash; bootstrap tokens expire after 24 hours by default.
  • Konnectivity tunnels control plane traffic through agent-opened connections; CNI WireGuard or IPsec encrypts node-to-node traffic but authenticates only nodes; Ingress TLS ends at the controller.

Compliance and Security Frameworks

10% of the exam
  • CIS Level 1 is a low-impact baseline and Level 2 adds defence in depth that may limit functionality; Automated or Manual is a separate tag about how a check is assessed.
  • On a managed service, assess against the provider's CIS benchmark (EKS, AKS, GKE), because the customer cannot see or fix the provider-run control plane.
  • kube-bench runs on the host (a Job with hostPID and read-only hostPath mounts, or a binary) because node checks read files and process flags; WARN means a manual check a person must verify.
  • The NSA/CISA guidance explains threats and practices; the CIS Benchmark lists numbered, auditable settings. NIST SP 800-190 covers image, registry, orchestrator, container and host OS risks.
  • CSF 2.0 has six functions; Govern is new and holds supply chain risk management, which sat under Identify in CSF 1.1.
  • Regulations state outcomes, not Kubernetes settings; PCI DSS scope includes everything connected to or able to affect card data systems, and segmentation is what shrinks it.
  • A compliance report is point-in-time: drift needs scheduled checks on every node, alerts on new failures and retained timestamped results.
  • Threat model during design from a data flow diagram with trust boundaries, and revisit it whenever a new flow or component appears.
  • STRIDE maps to properties (spoofing-authentication, tampering-integrity, repudiation-accountability, disclosure-confidentiality, DoS-availability, elevation-authorization); ATT&CK tactics are goals and techniques are methods.
  • SLSA Build L1 = provenance exists, L2 = hosted platform signs it, L3 = isolated runs and signing secrets out of reach of build steps; Gatekeeper audit/dryrun and Kyverno Audit with background scans report on existing resources without blocking.

Keep studying KCSA

KCSA flashcards: your questions

Yes — the whole KCSA deck is free and needs no account, as is every KCSA revision lesson. Create a free account to save progress and drill practice questions; full-length mock exams are a one-time unlock per certification.

Source

Exam structure, domain weights and scoring on this page come from the official KCSA exam guide.