Kubernetes SecurityContext Explained 🚀 SecurityContext is one of the most important and most ignored parts of Kubernetes security. It works in Pod and Container Level. 𝗣𝗼𝗱-𝗹𝗲𝘃𝗲𝗹: This security context applies to all the containers in the pod. It acts as a default for all containers in the Pod. 𝗖𝗼𝗻𝘁𝗮𝗶𝗻𝗲𝗿-𝗹𝗲𝘃𝗲𝗹 : This security context applies to individual containers that overrides the pod-level settings for that specific container. We created a practical guide that covers, - Why running containers as non-root is important - Default UID Assigned To Pods - Pod vs Container SecurityContext (with examples) - How Kubernetes treats container images with and without non-root users. 𝗥𝗲𝗮𝗱 𝗶𝘁 𝗛𝗲𝗿𝗲: https://lnkd.in/gHUE59Hu What is your approach to enforce non-root containers? - SecurityContext only? - Admission controllers? - Tools like Kyverno or OPA? Or… is this still not enforced in your setup? :) Comment below! #devops #kubernetes #security
Kubernetes SecurityContext Explained: Pod and Container Level Security
More Relevant Posts
-
🚀 Day 18/25 — Your Docker container might be running as root That’s a security risk ❌ Common issues I see: • Running containers as root • Using untrusted base images • Exposing unnecessary ports ✅ What I do instead: • Use non-root user • Use trusted base images • Keep image minimal ⚙️ Example: RUN useradd -m appuser USER appuser 💡 Real-world impact: • Reduced security risks • Safer production deployments 📌 One-line takeaway: Secure container = Safer application ➡️ Tomorrow: Docker vs Kubernetes #Docker #DevOps #Security #LearningInPublic
To view or add a comment, sign in
-
-
Kubernetes v1.36 is set to launch at the end of April 2026, featuring exciting enhancements and updates. I found it interesting that this version focuses on improving user experience and operational efficiency, which are crucial for managing today's complex infrastructures. What stood out to me was the emphasis on community feedback driving these changes. How do you see these updates impacting your workflow with Kubernetes?
To view or add a comment, sign in
-
Are you sure the Docker image you just pulled is actually safe? I used to assume it was. Until I started looking more closely at container security. Most teams do a solid job securing pipelines, managing access, setting firewall rules. But one thing gets skipped almost every time — verifying the image itself. That's where Docker Content Trust (DCT) comes in. What is DCT? It's a built-in Docker feature that ensures the image you pull is signed by the actual publisher, hasn't been tampered with, and is verified before it runs. It works using the Notary framework, based on The Update Framework (TUF). Not complicated — just cryptographic signing done right. Enabling it takes one line: export DOCKER_CONTENT_TRUST=1 Once set, Docker will only pull signed images. Unsigned ones are rejected automatically. No extra tools, no complex configuration. Why should DevOps engineers care? Supply chain attacks are increasing. One compromised image can take down your entire production environment. Standards like SOC2, PCI-DSS, and ISO 27001 already expect this kind of control in place. DCT adds a verification layer between your registry and runtime — and most teams aren't using it. One thing I'd suggest — don't just enable it on your local machine. Set it in your CI/CD pipeline so every team member is covered by default. Security only works when it's consistent. If your team hasn't looked at DCT yet, it's worth 10 minutes this week. Have you used it in production? Would love to hear how your team handles image trust. #Docker #DevOps #ContainerSecurity #DockerContentTrust #DevSecOps #CloudSecurity #Linux
To view or add a comment, sign in
-
-
Kubernetes Secrets are NOT as secure as most people think. While preparing for CKAD, I came across an important reality: Secrets are only Base64 encoded… not encrypted That means: Anyone with access can decode them easily. So why use Secrets? Because they are still safer than plain text, but: The real security comes from how you use them Key practices: Don’t commit secrets to Git Enable encryption at rest Use RBAC Prefer tools like Vault for production Also learned: Kubernetes: Sends secrets only to required nodes Stores them in memory (not disk) Deletes them when Pods are removed I wrote a simple breakdown here 👇 https://lnkd.in/enD8mjEc #kubernetes #ckad #devops #cloudsecurity #learninginpublic
To view or add a comment, sign in
-
What's happening in the Docker World! 🚀 Just came across this latest update straight from the official docker channel, Defending Your Software Supply Chain: What Every Engineering Team Should Do Now. The software supply chain is under sustained attack. Not from a single threat actor or a single incident, but from an ecosystem-wide campaign that has been escalating for months and shows no signs of slowing down. This week, axios, the HTTP client library downloaded 83 million times per week and present in roughly 80% of... Discover Docker's dynamic ecosystem—where AI breakthroughs, vulnerability updates, strategic roadmaps, exciting product releases, comprehensive tutorials, thought-provoking blog posts, engaging webinars and events, inspiring community highlights, and reliable technical support all converge to fuel your container journey. Stay connected for the latest insights and updates in this fast-paced container world! #Docker #Containers #TechInnovation #DevOps #CloudComputing #Kubernetes #CNCF
To view or add a comment, sign in
-
Kubernetes v1.36 just landed a security game-changer: User Namespaces are now Generally Available (GA)! 🚀 For anyone managing multi-tenant clusters, this is the policy design opportunity you’ve been waiting for. When paired with Kyverno, you can enforce practical, scalable security across your environment. The key shift is powerful in its simplicity: 1. Set hostUsers: false 2. Keep workload flexibility 3. Reduce the host compromise blast radius Why this matters for your security posture: 1. The root inside the container is no longer directly a host-root equivalent. 2. Capabilities like CAP_NET_ADMIN become namespaced when hostUsers: false is set. 3. You can now support advanced workloads without defaulting to high-risk patterns. We designed an 8-policy Kyverno framework around this to enforce the new baseline. Key actions include: 1. Requirement: Enforce hostUsers: false. 2. Blockers: Block privileged: true and host namespace joins (like hostNetwork, hostPID, hostIPC) unless User Namespaces are active. 3. Adoption: Mutate missing hostUsers to false for passive adoption. Successful rollout strategy: 1. Audit first for visibility. 2. Mutate next for passive adoption. 3. Enforce high-risk blockers (e.g., blocking privileged containers). 4. Enforce the baseline requirement (hostUsers: false) last. The bottom line: v1.36 User Namespaces is not just a feature toggle—it's a massive policy-design opportunity to strengthen your Kubernetes security model fundamentally. Time to start planning your migration! #Kubernetes #K8s #Security #Kyverno #CloudNative #DevSecOps #MultiTenancy #Kyverno #PolicyAsCode
To view or add a comment, sign in
-
Docker reflects on the first year of Docker Hardened Images (DHI), sharing milestones and industry practices. I found it interesting that they embraced the challenging path for enhanced security and trust. It’s a reminder that sometimes the harder choices pave the way for better outcomes. What challenges have you faced in adopting new technologies, and how did they ultimately benefit your projects?
Why We Chose the Harder Path: Docker Hardened Images, One Year Later | Docker https://www.docker.com To view or add a comment, sign in
-
Your Docker image might be insecure. Common risks: • Running as root • Hardcoded secrets • Unpatched dependencies Fix: • Use non-root user • Scan with Trivy • Keep images minimal Security starts at build time. Do you scanning images in your CI pipeline ? #DevOps #Docker #Security
To view or add a comment, sign in
-
👉 Kubernetes security isn’t a checklist anymore. In modern platforms, security is continuous, automated, and built-in. Here’s what leading teams are doing: • Enforcing policies at deploy time (not after) • Using OPA Gatekeeper / Kyverno for policy-as-code • Embedding security checks directly into GitOps workflows • Securing the supply chain (signed images, SBOMs) • Treating platform security as guardrails, not gatekeeping The real shift: 👉 Security is no longer a blocker 👉 It’s part of the platform design 💡 Takeaway: If your platform relies on manual security reviews, you’re already behind. #Kubernetes #Security #DevSecOps #PlatformEngineering #OpenShift #CloudNative #GitOps #SRE #ZeroTrust
To view or add a comment, sign in
-
-
🔥 Strong perspective on Kubernetes security. The shift is clear — security is no longer a checkpoint, it’s part of the system itself. From policy-as-code using OPA Gatekeeper / Kyverno to embedding controls in GitOps workflows — leading teams are building security into the platform, not layering it on top. 💡 The real takeaway: If security is still manual, it’s already slowing you down. #Kubernetes #DevSecOps #PlatformEngineering #CloudSecurity
Platform Engineer | Kubernetes (CKA/CKAD) | OpenShift | Alauda ACP | GitOps (Argo CD) | Tekton CI/CD | RHCSA RHCE | Linux | DevOps | Multi-Cluster | Air-Gapped | Security | Automation | Troubleshooting
👉 Kubernetes security isn’t a checklist anymore. In modern platforms, security is continuous, automated, and built-in. Here’s what leading teams are doing: • Enforcing policies at deploy time (not after) • Using OPA Gatekeeper / Kyverno for policy-as-code • Embedding security checks directly into GitOps workflows • Securing the supply chain (signed images, SBOMs) • Treating platform security as guardrails, not gatekeeping The real shift: 👉 Security is no longer a blocker 👉 It’s part of the platform design 💡 Takeaway: If your platform relies on manual security reviews, you’re already behind. #Kubernetes #Security #DevSecOps #PlatformEngineering #OpenShift #CloudNative #GitOps #SRE #ZeroTrust
To view or add a comment, sign in
-
Explore related topics
- Enforcing Non-Root User in Kubernetes Pods
- Securing Kubernetes Pods Without Third-Party Tools
- Securing Ephemeral Kubernetes Pods
- Securing Kubernetes Workloads With Network Policies
- Kubernetes Network Policy Management Strategies
- Preventing Over-Privileged Kubernetes Pods
- Setting Access Controls in Kubernetes
- Importance of KUBERNETES Security
- Simplify Kubernetes Security for IT Teams
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
una capa adicional es poner kubewarden para establecer politicas donde la definicion cumpla con esos requisitos global o en los namespace