← CKA: Kubernetes administration and troubleshooting
04 / 13 · 40 MIN

Authorize, install, and reconcile components

Read permissions and manifests as contracts distinct from application and reconciliation.

Authorize the exact request

A request has an identity, verb, API group, resource, subresource, and scope. A Role granting get on pods does not automatically grant get on pods/log. A RoleBinding grants permissions within its namespace even when it references a ClusterRole.

For a ServiceAccount, check the subject namespace: matching names in different namespaces are different identities. Compare the requirement with the effective rule before adding privileges. kubectl auth can-i helps inspect an operation, but impersonation requires the operator to hold that permission. Do not use cluster-admin as permanent diagnosis.

From chart to usable service

To install a component, identify chart origin and version, values, namespace, and dependencies. Local rendering helps inspect resulting images, permissions, and resources; it proves neither API-server acceptance nor availability. Retain the values actually used and inspect release and resource state after installation.

A timeout can coexist with objects already created. Before retrying, determine what exists and the recovery strategy. Dry-run output can include Secrets: shared evidence should preserve operational information without publishing credentials. Flags and automatic recovery depend on the Helm version.

Bases and overlays with inspectable output

A Kustomize base expresses shared resources; an overlay adds environment differences. Inspect kubectl kustomize output before applying it: namespace, references, image, selectors, and labels must remain coherent. A directory named production provides neither access protection nor proof that the intended image is selected.

A patch may match no resources or change a valid field to the wrong meaning. Compare the final result with intent and the published object. At handover, supply the base, overlay, and exact revision instead of relying on unrecorded local edits.

Available API and capable controller

A CRD lets the API server recognize a type. Its controller observes objects and attempts to realize requested state. If a custom object exists without the expected effect, inspect controller installation, logs, permissions, and published conditions.

A Forbidden error while creating Deployments concerns the controller request, not the already accepted CRD syntax. Correct the minimum necessary permission and then verify the dependent resource and function. When an operator manages objects, identify that authority before editing generated resources: reconciliation can undo manual changes.

apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: payment-log-reader
  namespace: payments
rules:
- apiGroups: [""]
  resources: ["pods/log"]
  verbs: ["get"]
IN PRACTICE

Support can view Pods in payments but cannot read their logs. Meanwhile, a Helm installation created an operator CRD whose controller receives Forbidden when creating Deployments. Treat the subjects separately: the reader needs the log subresource; the controller needs the observed operation in the authorized namespace. Validating one change does not authorize the other.

Common pitfalls

Confusing the failing subject; granting global access; treating rendering as installation; editing reconciled resources without identifying the controller.

Related topics: Kubernetes administration · Diagnosis and recovery

Take this idea with you

Check identity, scope, applied artifact, and reconciled effect as separate steps.

Create account

References

Kubernetes® and CKA are trademarks or registered trademarks of The Linux Foundation. bigsavant.com is an independent preparation platform and is not affiliated with, associated with, sponsored, authorised or endorsed by The Linux Foundation. Content and questions are original, are not official exam questions, and completing our tests does not award or guarantee any certification. Names are used only to identify the subject. All other trademarks belong to their respective owners.