Is Kubernetes Enough? 6 Proven Gaps and Mistakes to Avoid

Is Kubernetes enough for a production workflow? I put that question to a single-node k3s v1.37.2 cluster on Debian 13 (a KVM virtual machine) and tried the things a production team expects from a platform: secrets, security defaults, change control, resource limits and network isolation. Kubernetes passes some of them only after you add configuration, and fails others by default. Here is what each test returned.

Is Kubernetes enough for production: Pod Security denial and drift between the cluster and the manifest in the lab
Real lab output: a privileged pod denied in a restricted namespace, and a cluster that kept manual changes instead of the manifest.

Is Kubernetes enough for secrets? Not by default

I created a secret and read it back. The value is only base64, and anyone allowed to read the object decodes it in one command:

# kubectl get secret db-cred -o jsonpath="{.data.password}"
UzNjcjN0LVByb2QtUGFzcw==
# kubectl get secret db-cred -o jsonpath="{.data.password}" | base64 -d
S3cr3t-Prod-Pass
# k3s secrets-encrypt status
Encryption Status: Disabled, no configuration file found

Worse for a production cluster, the plain value was also inside the datastore file: a strings search of state.db found S3cr3t-Prod-Pass. Access control still worked. The default service account could not read secrets (auth can-i answered "no"), and after I bound the built-in view role it could list pods but still not read secrets (the role excludes them). I also tried k3s secrets-encrypt enable, and in my one-node lab the status stayed "Disabled" and reencrypt died with a fatal error, so I cannot confirm that path; the Kubernetes documentation on encrypting data at rest and the secrets good practices page are where to start.

Is Kubernetes enough for pod security? No guardrails until you add them

The default namespace accepted a pod with privileged: true and hostNetwork: true, and inside it I saw 140 entries in /dev and 9 network links, so it sees the host. Nothing stopped it. That is the honest answer to "is Kubernetes enough" for multi-team clusters: it is not, until you turn on admission controls.

The built-in Pod Security Admission does the first job. I labelled a namespace pod-security.kubernetes.io/enforce=restricted, and the same pod was refused:

# kubectl -n prod apply -f /root/priv.yaml
Error from server (Forbidden): pods "priv" is forbidden: violates PodSecurity "restricted:latest": host namespaces (hostNetwork=true), privileged (container "c" must not set securityContext.privileged=true) ...

Even a plain kubectl run web --image=nginx was refused for missing allowPrivilegeEscalation=false, so developers need a secure pod template. Two traps showed up. First, labelling the default namespace only printed a warning about the existing pod and it kept running (priv 1/1 Running), so enforcement is not retroactive. Second, a Deployment is created successfully (web2 0/1) and the failure appears only as FailedCreate events on the ReplicaSet, which is where you must look. The Pod Security Admission documentation describes the three levels.

For custom rules you do not need an external tool in every case. I applied a built-in ValidatingAdmissionPolicy written in CEL that demands readOnlyRootFilesystem: true. The pod that passed Pod Security was now denied with my message, and the fixed pod started and answered "Read-only file system" on touch /tmp/x. Tools such as OPA Gatekeeper or Kyverno are still an option for larger rule sets; I did not test them here.

Is Kubernetes enough for change control? It does not undo manual edits

This is the strongest argument for GitOps. I applied a manifest with 2 replicas and a 128Mi memory limit, then changed it by hand to 5 replicas and 1Gi. The cluster kept my change. kubectl diff against the manifest showed the drift, and nothing corrected it:

# kubectl get deploy shop -o jsonpath="{.spec.replicas} {.spec.template.spec.containers[0].resources.limits.memory}"
5 1Gi
# kubectl diff -f /root/app.yaml | grep -E "^[-+] "
-  replicas: 5
+  replicas: 2
-            memory: 1Gi
+            memory: 128Mi

Kubernetes keeps the desired state you last wrote, not the one in Git. A controller that reconciles the cluster against a repository, such as Argo CD (see its documentation), closes that gap; I did not run it in this lab, so I only state what the missing piece is. A cheaper first step is to make kubectl diff a required pipeline stage.

Is Kubernetes enough for resources and network? Open by default

A fresh cluster had no LimitRange and no ResourceQuota. A pod started without limits got the BestEffort class, the first to be evicted under pressure and able to take as much as the node allows. After I added a LimitRange with defaults (64Mi/100m requests, 256Mi/500m limits), the next pod received them automatically and became Burstable.

Network traffic is open as well. A pod in the same namespace fetched the nginx welcome page from the service with no rule at all. After a default-deny-ingress NetworkPolicy the same request failed with "Connection refused", and deleting the policy restored access. Remember that a NetworkPolicy only works when the network plugin enforces it, and k3s did here.

Is Kubernetes enough? A short answer by area

  1. Secrets: base64 only; add encryption at rest or an external secret store.
  2. Pod security: nothing enforced by default; use Pod Security Admission per namespace.
  3. Custom policy: ValidatingAdmissionPolicy works built-in.
  4. Drift: not corrected; use GitOps plus kubectl diff in CI.
  5. Resources: add LimitRange and ResourceQuota per namespace.
  6. Network: add default-deny NetworkPolicies.

For the basics of how a cluster heals itself, see my Kubernetes deep dive.

Treat this list as a starting checklist for a review, not a finished platform design. Each gap above can be closed with a few lines of configuration, which is why the question "is Kubernetes enough" is really a question about who owns that configuration in your team.

Frequently asked questions

Is Kubernetes enough on its own for production? No. It gives you scheduling and self-healing, but in this test secrets, security, drift, resources and network isolation all needed extra configuration.

Do I need a service mesh to answer "is Kubernetes enough"? Not for the six items above. A mesh adds mTLS and traffic splitting, which I did not test.

Conclusion

So, is Kubernetes enough? It is a strong base, but the defaults are permissive. Turn on Pod Security Admission, set limits and default-deny network rules, decide how secrets are protected, and make the repository the source of truth. Tested on k3s v1.37.2 (Kubernetes v1.37.2) on Debian 13; GitOps tooling and external policy engines were not run.

Comments

Popular posts from this blog

How to Play Minecraft Bedrock Edition on Linux: A Comprehensive Guide for Tech Professionals

Linux desktop frozen? My 5 go-to tricks to try - before forcing a hard reboot

The Ultimate Guide: How to Set Up DXVK in Wine on Linux for Enhanced Gaming Performance