Which TWO mechanisms help secure Kubernetes Secrets against unauthorized access or exposure?
Encrypts secret data in etcd.
Why this answer
Encryption at rest in etcd and strict RBAC least privilege are key mechanisms for protecting secrets.
72 questions · Kubernetes Security Fundamentals · All types, answers revealed
Which TWO mechanisms help secure Kubernetes Secrets against unauthorized access or exposure?
Encrypts secret data in etcd.
Why this answer
Encryption at rest in etcd and strict RBAC least privilege are key mechanisms for protecting secrets.
Which TWO tools or built-in Kubernetes features are used to secure container privileges and behaviors?
Defines security profiles for pods.
Why this answer
Pod Security Standards and security contexts are core mechanisms for securing container privileges.
An administrator needs to restrict access so that a specific ServiceAccount in the production namespace can only list pods, but cannot delete or modify them. Which core Kubernetes API resource should be configured to achieve this using RBAC?
A Role and RoleBinding limit permissions to a single namespace, perfect for restricting a specific ServiceAccount.
Why this answer
A Role defines permissions within a particular namespace. By binding a Role to a ServiceAccount via a RoleBinding, permissions are restricted strictly to that namespace.
Which THREE fields are required when defining an egress rule in a Kubernetes NetworkPolicy?
The egress array defines outgoing rules.
Why this answer
Egress rules contain ports, to/ipBlock/etc., but the policy itself must include 'policyTypes' containing 'Egress', and the rules themselves specify destinations ('to') and optional ports.
Which THREE methods can be used to inject Kubernetes Secrets into a running pod?
Secrets can populate container environment variables.
Why this answer
Secrets can be injected into pods via environment variables, environment variables from secret keys, or mounted as files in volumes.
By default, how are Kubernetes Secrets stored in etcd when created without additional encryption-at-rest configurations?
Base64 is an encoding mechanism, not encryption; secrets are stored in etcd encoded in Base64.
Why this answer
By default, Kubernetes Secrets are stored encoded in Base64 plaintext within etcd, meaning anyone with etcd access can decode them.
Which THREE of the following are official Pod Security Standard enforcement levels recognized by Kubernetes?
Baseline prevents known privilege escalations.
Why this answer
The three official levels defined by Kubernetes Pod Security Standards are privileged, baseline, and restricted.
Which TWO actions can be performed using Kubernetes RBAC rules?
ClusterRoles control cluster-wide resource creation.
Why this answer
RBAC rules define API groups, resources, and verbs to control permissions.
You want to ensure that a newly created Role in namespace 'finance' cannot be modified or deleted by regular developers who have edit permissions. Which RBAC feature or design prevents unauthorized privilege escalation through Role manipulation?
Users cannot assign permissions via Roles or RoleBindings unless they already possess those exact permissions themselves.
Why this answer
Kubernetes has built-in authorization checks (RBAC privilege escalation prevention) that prevent users from creating or editing roles/rolebindings with permissions they do not themselves possess.
When configuring Pod Security Standards on a namespace, which THREE security restrictions are enforced by the 'restricted' profile that are NOT enforced by the 'baseline' profile? (Choose THREE)
Restricted limits volume types significantly more than baseline to prevent host access.
Why this answer
The restricted profile adds requirements such as running as a non-root user, preventing escalation of privileges, and restricting allowed volume types.
Which THREE fields are required when defining a standard Kubernetes NetworkPolicy resource? (Choose THREE)
Metadata including name and namespace is required.
Why this answer
A NetworkPolicy requires apiVersion, kind, metadata, and spec containing at least podSelector.
You need to isolate a database pod so that only pods with the label 'tier=frontend' within the same namespace can connect to it on port 5432. Which NetworkPolicy resource configuration achieves this?
This accurately restricts incoming traffic to only authorized frontend pods on the database port.
Why this answer
A NetworkPolicy targeting the database pods with 'podSelector' and defining an 'ingress' rule allowing traffic from pods matching 'tier=frontend' on port 5432.
A security engineer wants to ensure that a pod cannot escalate its privileges to gain root access on the node. Which securityContext setting should be configured to prevent privilege escalation?
This directly prevents processes from gaining additional privileges, such as through setuid/setgid binaries.
Why this answer
Setting allowPrivilegeEscalation: false in the container's securityContext ensures that a process cannot gain more privileges than its parent process (e.g., via setuid binaries).
An administrator needs to store sensitive database credentials securely so that they can be mounted as environment variables inside a specific pod. Which Kubernetes object is designed for this purpose?
Secrets are intended for sensitive configuration data.
Why this answer
Secret objects store sensitive data such as passwords, tokens, and keys.
What is the purpose of the Pod Security Standards 'baseline' profile?
Baseline strikes a balance between security hardening and application compatibility.
Why this answer
The baseline profile prevents known privilege escalations while allowing the default (minimally specified) pod configuration.
You want to write a NetworkPolicy that allows backend pods to communicate with an external database located outside the cluster at IP address '203.0.113.50'. Which NetworkPolicy section must you configure?
Egress rules control outgoing traffic, and ipBlock allows specifying external CIDR ranges.
Why this answer
To control traffic leaving the pod to external IPs or destinations outside the pod network, you must configure 'egress' rules with a 'ipBlock'.
Which TWO statements accurately describe how Kubernetes admission controllers function? (Choose TWO)
Validation phase ensures compliance without mutating the payload.
Why this answer
Admission controllers execute in two phases (mutating then validating) and can reject or modify requests before persistence.
An administrator needs to grant read-only access to Pods specifically within the 'development' namespace to a new user. Which RBAC configuration correctly scopes this permission?
A Role combined with a RoleBinding in the target namespace properly restricts permissions to that namespace only.
Why this answer
A Role must be used instead of a ClusterRole when scoping permissions to a single namespace. The Role must be bound via a RoleBinding within that same namespace.
You need to restrict network traffic so that only pods with the label 'tier=frontend' can communicate with pods labeled 'tier=backend' in the same namespace. Which Kubernetes resource should you create?
NetworkPolicies control ingress and egress traffic for pods.
Why this answer
A NetworkPolicy is used to restrict pod-to-pod and network traffic at the IP/port/label level.
Which THREE components are involved when an external client authenticates to the Kubernetes API server using OpenID Connect (OIDC)? (Choose THREE)
The IdP authenticates the user and provides the JSON Web Token (JWT).
Why this answer
OIDC authentication involves the client (e.g. kubectl), the OIDC identity provider, and the kube-apiserver.
Which TWO of the following statements are true regarding Kubernetes Secrets and their security posture by default?
Environment variables are visible via process listings and diagnostic dumps, making volume mounts generally more secure for secrets.
Why this answer
Kubernetes Secrets are base64 encoded (not encrypted) by default in etcd, and access to them can be controlled via RBAC.
Which THREE options represent valid ways to supply sensitive data to a container using Kubernetes native features? (Choose THREE)
Secrets can be mounted as files in a volume.
Why this answer
Secrets can be mounted as volumes, exposed as environment variables, or accessed via the Kubernetes API directly.
Which TWO of the following are valid Kubernetes RBAC rule subjects that can be bound to roles or cluster roles?
Users represent human users authenticated to the cluster.
Why this answer
Kubernetes RBAC supports three primary subjects: User, Group, and ServiceAccount.
You are auditing a cluster and find a pod that mounts the host's root filesystem directly into the container. Which Pod Security Standard rule does this violate?
hostPath volumes provide direct access to the underlying node filesystem and are blocked by default in hardened standards.
Why this answer
Mounting host paths (hostPath volumes) is prohibited by both the baseline and restricted Pod Security Standards because it allows container escape.
You have configured a NetworkPolicy with an egress rule targeting a specific CIDR block. However, DNS resolution for external domain names fails from within the pods selected by this policy. What is the most likely cause?
Egress policies block DNS queries to CoreDNS/kube-dns unless port 53 egress is explicitly permitted.
Why this answer
When an egress policy is applied, all outgoing traffic (including UDP/TCP port 53 to cluster DNS servers) is blocked unless explicitly allowed by an egress rule.
A security auditor notices that a deployment running in the 'production' namespace is violating the Restricted Pod Security Standard because containers are running as root. How can you enforce compliance using Pod Security Admission?
Namespace labels are the correct mechanism to configure the Pod Security Admission controller to enforce standards.
Why this answer
Applying the 'pod-security.kubernetes.io/enforce: restricted' label to the namespace enforces the restricted Pod Security Standard for all newly created pods.
An application pod requires access to the Kubernetes API to list other pods. To follow secure practices, you create a dedicated ServiceAccount and bind a custom Role to it. How should you configure the Pod specification to prevent the default service account token from being automatically mounted?
This setting stops the default token from being mounted into the pod's filesystem.
Why this answer
Setting 'automountServiceAccountToken: false' on either the ServiceAccount or the Pod specification prevents the automatic mounting of the token, reducing the blast radius if compromised.
A cluster administrator needs to grant read-only access to pods within the 'development' namespace using Kubernetes RBAC. Which resource kind should be used to define the permissions?
Role is used to define permissions within a single namespace.
Why this answer
A Role defines permissions within a specific namespace, whereas a ClusterRole defines cluster-scoped permissions. Since the requirement is restricted to the 'development' namespace, a Role is the correct resource.
An external identity provider (OIDC) is integrated with your Kubernetes cluster. You want to restrict a group named 'contractors' so they can only view pods in the 'staging' namespace. Which configuration correctly maps this requirement?
Binding a ClusterRole via a RoleBinding scopes the permissions strictly to the target namespace for the specified OIDC group.
Why this answer
A ClusterRole providing read access to pods, combined with a RoleBinding in the 'staging' namespace referencing the OIDC group 'contractors'.
An application running in a pod needs to securely consume a database password without storing it in plaintext within the container image or deployment manifest. Which native Kubernetes resource is best suited for storing this sensitive key-value data?
Secrets are intended for sensitive data and provide mechanisms to mount them as files or environment variables inside pods.
Why this answer
Kubernetes Secrets are designed specifically to store and manage sensitive information such as passwords, OAuth tokens, and ssh keys.
Which TWO of the following actions are considered best practices for securing Kubernetes Secrets? (Choose TWO)
Encrypting Secrets at rest protects them if the underlying etcd data store is compromised.
Why this answer
Enabling encryption at rest in etcd and restricting RBAC access to Secrets are core practices. Base64 encoding is not security, and putting secrets in ConfigMaps is insecure.
When configuring a MutatingWebhookConfiguration, you notice that mutating webhooks are executed before validating webhooks. Why is this execution order critical for security and consistency?
Validating webhooks need to check the exact object configuration that will be persisted, which includes any changes made by mutating webhooks.
Why this answer
Mutating webhooks can alter the object (e.g., injecting sidecars or default security contexts). Validating webhooks must run after mutation so they validate the final, resulting object state.
Your cluster uses the Pod Security admission controller with the 'restricted' profile enforced. A legacy application pod fails to start because it requires running as root (runAsNonRoot: false). How should you handle this securely without disabling the standard?
The Pod Security admission plugin supports exemptions for specific usernames, namespaces, and runtime classes via its configuration file.
Why this answer
To accommodate specific pods that need exceptions while maintaining an overall enforce profile, you can use the 'audit' or 'warn' modes for specific versions or adjust the namespace labels, or use an exception mechanism if supported, but best practice is fixing the application or using a targeted bypass/exception if allowed, or applying an explicit exception configuration in the Pod Security admission configuration file.
You are reviewing admission webhook configurations and notice that timeoutSeconds is set to 3 seconds for a critical validation webhook. If the webhook server takes 4 seconds to respond, what does the API server do when failurePolicy is 'Ignore'?
An 'Ignore' failure policy allows requests to proceed despite webhook errors or timeouts.
Why this answer
When failurePolicy is 'Ignore', a timeout or error reaching the webhook results in the API server ignoring the failure and allowing the request to proceed.
A security engineer wants to apply Pod Security Standards globally across an entire namespace using the modern built-in admission mechanism. Which approach should be used?
Namespace labels are the standard method for configuring the Pod Security admission controller.
Why this answer
The Pod Security admission controller uses namespace labels (such as 'pod-security.kubernetes.io/enforce') to apply enforcement levels like privileged, baseline, or restricted.
Which TWO components are involved in configuring and processing admission webhooks in a Kubernetes cluster?
The API server invokes admission webhooks during request processing.
Why this answer
Admission webhooks are configured via MutatingWebhookConfiguration or ValidatingWebhookConfiguration objects, and processed by the kube-apiserver.
An administrator is hardening a Kubernetes cluster against container breakout vulnerabilities and node compromise. Which THREE security practices should be implemented?
A read-only root filesystem prevents attackers from dropping binaries or modifying system files inside the container.
Why this answer
Hardening involves dropping unnecessary Linux capabilities, enforcing read-only root filesystems where applicable, and avoiding sharing host namespaces like hostNetwork or hostPID.
An application pod requires read access to secrets in the 'production' namespace. You need to bind a pre-existing ClusterRole named 'secret-reader' to a service account named 'app-sa' in that namespace. Which RBAC resource accomplishes this?
A RoleBinding in the target namespace can bind to a ClusterRole, granting access scoped to that namespace.
Why this answer
A RoleBinding can reference a ClusterRole to grant permissions defined in that ClusterRole to subjects within the specific namespace of the RoleBinding.
A CI/CD pipeline service account needs permission to create Deployments and Services across multiple namespaces, but should not have cluster-admin privileges. What is the most secure way to grant these permissions?
This allows a single ClusterRole definition to be reused across multiple namespaces via namespaced RoleBindings, limiting scope.
Why this answer
Create a ClusterRole with the necessary rules for Deployments and Services, and bind it to the service account in each target namespace using RoleBindings.
You are troubleshooting a custom controller that fails to read ConfigMaps in the 'kube-system' namespace despite having a ClusterRole bound via a ClusterRoleBinding. What is the most likely reason for this failure?
RBAC permissions are explicitly defined by resource and verb combinations; if 'configmaps' or verbs are missing, access is denied.
Why this answer
While ClusterRoleBindings grant cluster-wide access, certain system namespaces or sensitive resources may be protected or restricted, or the ClusterRole might not include the correct API groups/resources. However, a common security hardening practice or misconfiguration involves incorrect rule definitions, or the verbs/resources mismatch. Specifically, let's look at the options: missing verbs, or standard RBAC behavior where ClusterRoleBindings apply everywhere unless restricted.
Wait, let's examine option A.
You are deploying a ValidatingWebhookConfiguration to inspect incoming pod creations. What happens if the webhook fails and the 'failurePolicy' in the webhook configuration is set to 'Fail'?
A failurePolicy of 'Fail' means webhook errors result in request rejection (fail closed).
Why this answer
When failurePolicy is set to 'Fail', any error or timeout reaching the external webhook causes the API server to reject the API request.
An application pod needs to access the Kubernetes API server securely. How does Kubernetes authenticate the pod by default when it communicates with the API server?
Pods authenticate to the API server via the projected ServiceAccount token.
Why this answer
Kubernetes automatically mounts a ServiceAccount token into the pod's filesystem, which the pod sends as a Bearer token to authenticate with the API server.
An administrator wishes to inspect which admission controllers are currently enabled in a running Kubernetes cluster. Where is this typically configured in a stacked control plane?
The API server configuration file defines active admission plugins.
Why this answer
Admission controllers are configured via the '--enable-admission-plugins' flag on the kube-apiserver static pod manifest.
Which THREE features are enforced or verified by the Kubernetes 'restricted' Pod Security Standard profile?
Restricted profile restricts Linux capabilities.
Why this answer
The restricted profile enforces running as non-root, dropping all capabilities (or keeping only NET_BIND_SERVICE), and prohibiting privilege escalation.
Which TWO mechanisms are used by Kubernetes admission controllers to enforce security policies during the API request lifecycle?
Validating webhooks inspect the final object state and return a pass/fail decision to the API server.
Why this answer
Mutating admission controllers can modify incoming objects before they are persisted, and Validating admission controllers can evaluate and reject non-compliant requests.
An application pod needs to mount a Secret as environment variables. Which section of the Pod manifest should be configured to achieve this securely?
These are the correct fields for injecting Secret data as environment variables into containers.
Why this answer
Environment variables can be populated from Secrets using 'envFrom' or 'env' with 'valueFrom.secretKeyRef'.
Which TWO components are core parts of the Kubernetes authorization architecture? (Choose TWO)
Kubernetes supports external authorization via webhook token/request evaluation.
Why this answer
RBAC and Webhook are authorization modes evaluated by the API server after authentication.
A security engineer configures a ValidatingWebhookConfiguration to intercept pod creations. The webhook service goes down due to a network partition. What happens to incoming pod creation requests by default if the webhook 'failurePolicy' is set to 'Fail'?
A 'Fail' policy treats webhook unavailability as a validation failure, blocking the request.
Why this answer
When failurePolicy is set to 'Fail', if the webhook encounters an error or is unreachable, the API server rejects the request.
Which THREE conditions must be met for a RoleBinding to successfully grant permissions to a ServiceAccount?
Namespaced RoleBindings and Roles must be in the same namespace.
Why this answer
A RoleBinding requires a valid Role/ClusterRole reference, valid subjects (ServiceAccount), and must exist in the correct namespace (for RoleBindings).
An administrator wishes to create a NetworkPolicy that allows incoming traffic from any pod in any namespace, provided those pods have the label 'environment=production'. How should the NetworkPolicy 'ingress' rule be structured?
Combining namespaceSelector and podSelector in an ingress rule allows cross-namespace traffic filtering based on labels.
Why this answer
To select pods across namespaces, the 'from' array must use 'namespaceSelector' combined with 'podSelector'.
An enterprise cluster requires that all incoming NetworkPolicies must default to denying all traffic unless explicitly allowed. A developer creates a namespace but forgets to apply any policies. What is the default behavior of Kubernetes regarding inter-pod traffic within a namespace when no NetworkPolicies are present?
Kubernetes network model is non-isolated by default until a NetworkPolicy selects a pod.
Why this answer
By default, Kubernetes namespaces are non-isolated (allow-all). All pods can communicate with all other pods unless a NetworkPolicy explicitly restricts traffic.
A cluster operator is enforcing the Pod Security Standards "restricted" profile across a namespace. A developer attempts to deploy a container running as root (runAsUser: 0). What will happen during the admission phase?
The restricted profile forbids containers running as root, causing the Pod Security admission controller to deny the request.
Why this answer
The restricted Pod Security Standard explicitly prohibits containers from running as root and enforces a non-root user. The request will be rejected by the Pod Security admission controller.
What is the primary function of the 'automountServiceAccountToken: false' setting in a Pod specification?
This setting disables token auto-mounting for enhanced security.
Why this answer
Setting automountServiceAccountToken to false prevents the automatic mounting of the ServiceAccount API token into the pod's filesystem, reducing the attack surface if the pod is compromised.
A developer accidentally committed plain-text database passwords into a public Git repository. The password was stored in a Kubernetes Secret manifest. What immediate remediation step should be taken regarding the Secret?
Since the secret was exposed, the credential itself is compromised and must be rotated at the source.
Why this answer
Rotate the compromised password in the database immediately, then update the Kubernetes Secret with the new password.
You need to ensure that a Secret containing database credentials cannot be read by anyone except the database application controller, even if they have broad RBAC read permissions in the namespace. Which feature should you consider?
Avoiding Kubernetes Secret objects eliminates the risk of users with namespace Secret read permissions accessing the credentials.
Why this answer
Standard Kubernetes RBAC is resource-based and does not support cell-level or secret-value level restrictions natively within a namespace once read access to secrets is granted. However, migrating to an external secrets manager or using advanced admission control can restrict access. Within native Kubernetes, RBAC allows reading secrets if 'get' or 'list' is granted on 'secrets'.
To strictly isolate secrets, external secret operators injecting secrets via environment variables or volume mounts without granting direct secret API access is standard practice.
An administrator wants to ensure that no container in a specific namespace runs with a root User ID (UID 0). Which security context setting should be enforced?
runAsNonRoot ensures containers fail to start if they run as root.
Why this answer
Setting 'runAsNonRoot: true' in the security context forces the container runtime to reject containers that attempt to run as UID 0.
Which TWO statements are true regarding Kubernetes NetworkPolicy default behaviors?
Cluster networking is open by default until policies are applied.
Why this answer
By default, pods are non-isolated (all traffic allowed). When a NetworkPolicy selects pods and specifies ingress/egress, those specific directions become deny-by-default.
An auditor notices that default ServiceAccounts in newly created namespaces are automatically mounting their API tokens into pods, creating an unnecessary attack surface. How can an administrator permanently disable automatic token mounting for all new service accounts in a specific namespace?
Pods referencing that ServiceAccount will no longer automatically mount the token unless explicitly overridden in the pod spec.
Why this answer
Setting automountServiceAccountToken: false on the ServiceAccount resource prevents the token from being automatically mounted into pods using that service account.
Which RBAC verb allows a user to delete an existing resource in a Kubernetes namespace?
The 'delete' verb grants permission to remove resources.
Why this answer
The 'delete' verb specifically authorizes removing resources.
Under the Pod Security Standards, a developer attempts to deploy a pod with 'privileged: true' in a namespace labeled with 'pod-security.kubernetes.io/enforce=baseline'. What will happen?
Privileged mode violates the baseline policy, causing the admission controller to deny the request.
Why this answer
The 'baseline' profile prohibits privileged containers. The admission controller will reject the pod creation request.
Which TWO entities can be assigned RBAC permissions in a Kubernetes cluster? (Choose TWO)
ServiceAccounts are standard non-human identities in Kubernetes.
Why this answer
RBAC bindings can be assigned to Users, Groups, and ServiceAccounts.
An administrator wants to prevent users from creating pods that mount the host network ('hostNetwork: true'). Which tool or feature is best suited to enforce this restriction natively across the cluster?
Both baseline and restricted Pod Security profiles disallow hostNetwork.
Why this answer
The Pod Security admission controller's 'restricted' or 'baseline' profile automatically blocks pods that set 'hostNetwork: true'.
You want to enable encryption at rest for Kubernetes Secrets in your cluster using an external KMS (Key Management Service) provider. Which component on the control plane reads the EncryptionConfiguration file and handles this encryption?
The API server handles encryption at rest and integrates with the EncryptionConfiguration resource and KMS plugins.
Why this answer
The kube-apiserver is responsible for interacting with etcd and applies the EncryptionConfiguration to encrypt secrets before writing them to etcd and decrypting them when read.
A cluster administrator needs to intercept and reject any resource creation requests that do not include a mandatory security-context label. Which admission controller type should be implemented?
Validating admission webhooks inspect incoming requests and can reject them if they fail specific organizational policies.
Why this answer
Validating admission webhooks are executed after all mutation phases are complete and can accept or reject requests based on custom validation logic.
You are troubleshooting a pod that fails to start because it attempts to run a container with privileges. The cluster enforces the 'baseline' Pod Security Standard. Which container configuration will cause the Pod Security Admission controller to reject the pod?
Privileged containers are explicitly prohibited by both baseline and restricted Pod Security Standards.
Why this answer
The baseline standard disallows privileged containers. Setting 'securityContext.privileged: true' violates the baseline standard and will be rejected.
Which of the following describes a recommended security practice when managing Kubernetes Secrets?
Principle of least privilege applies strongly to secrets access.
Why this answer
Restricting RBAC permissions to secrets ensures that only authorized users and workloads can read sensitive data.
Your team is storing sensitive database credentials in Kubernetes Secrets. A security review reveals that base64 encoding does not provide encryption at rest. What mechanism should you enable to ensure Secrets are encrypted when stored in etcd?
This is the native Kubernetes mechanism for encrypting Secret resources at rest in etcd.
Why this answer
Enabling EncryptionConfiguration with providers like aescbc or kms ensures that API server encrypts secret data before writing it to etcd.
You need to grant a monitoring tool permission to perform HTTP GET requests against health endpoints across all pods in the cluster, but no other API access. How should you define the RBAC rules?
Non-resource URLs grant access to cluster endpoints that do not correspond to API resource objects.
Why this answer
Non-resource URLs like '/healthz' or pod subresources like '/pods/{name}/proxy' are specified using 'nonResourceURLs' or subresource permissions in rules.
Which TWO types of selectors can be used within a Kubernetes NetworkPolicy ingress rule to specify allowed traffic sources?
namespaceSelector matches entire source namespaces based on labels.
Why this answer
Ingress 'from' blocks support podSelector and namespaceSelector to match traffic sources.
An auditor notices that a secret is mounted as a volume in a pod. Where is this secret stored on the worker node filesystem by default?
Secret volumes are backed by tmpfs so they reside in RAM.
Why this answer
Kubernetes secrets mounted as volumes are stored in tmpfs (RAM-backed memory) on the worker node, preventing them from being written to persistent disk storage.
You have deployed a NetworkPolicy in a namespace that selects backend pods, defining an 'ingress' rule with a 'from' block. No other NetworkPolicies exist in the namespace. What is the default behavior for traffic from pods not matched by the 'from' selector?
NetworkPolicies are additive and restrictive; defining an ingress rule makes the targeted pods default-deny for unspecified sources.
Why this answer
When a NetworkPolicy selects a pod and defines an ingress section, all ingress traffic not explicitly allowed by the policy is denied by default.
You are auditing a Kubernetes cluster and notice that a specific ServiceAccount has been granted the 'impersonate' verb on users. What security risk does this permission introduce?
Impersonation grants the ability to assume other identities, bypassing standard RBAC restrictions if high-privilege identities can be assumed.
Why this answer
The 'impersonate' verb allows the holder to act as other users or service accounts, effectively escalating their privileges to match any identity they can impersonate.
Ready to test yourself?
Try a timed practice session using only Kubernetes Security Fundamentals questions.