Excited to share a proof-of-concept I’ve been working on. Kubefence — a Kubernetes Node Resource Interface (NRI) plugin that transparently sandboxes container processes using nono - https://nono.sh/. Nono leverages the Landlock Linux Security Module (LSM) to make process-level sandboxing easy to use. You should try it out if you haven't yet. 💡 Motivation for Kubefence I wanted to explore a practical way to bring LSM-based sandboxing into Kubernetes workloads for different container runtimes. Kubefence is an attempt in that direction. ⚙️ How it works - A DaemonSet registers as an NRI plugin with containerd / CRI-O - Pods opting in via a nono-sandbox RuntimeClass are intercepted at creation time - The plugin rewrites the container entrypoint to wrap execution with nono: "/nono/nono wrap --profile default -- <original command>" The nono binary is bind-mounted from the host 🔧 Compatibility Works with: runc-based containers and Kata Containers 🧪 Try it out 🔗 https://lnkd.in/gCYuUuwe Would love feedback especially on using the NRI plugin approach for securing agent workloads in Kubernetes.
Securing Ephemeral Kubernetes Pods
Explore top LinkedIn content from expert professionals.
Summary
Securing ephemeral Kubernetes pods means protecting short-lived containers in a Kubernetes cluster from security threats. Since these pods are created and destroyed quickly, it’s important to limit their access and secure their behavior to prevent vulnerabilities from spreading across the cluster.
- Control communication: Set up network policies so that only trusted pods can interact, while all other connections are blocked by default.
- Enforce sandboxing: Use process-level sandboxing tools like Kubefence and runtime classes to prevent pods from accessing resources beyond their scope.
- Restrict permissions: Configure pods to run as non-root users and scan container images for compliance to reduce security risks.
-
-
Security starts with the right permissions. Running pods as root will cause you so much headache. Here is an excellent lab to help you see the impact. You can run it locally with Minikube! Here are some things I have been learning in my studying for the CKS that can help. • PodSecurity Standards and Admission Controllers: Leverage Kubernetes native features like PodSecurity admission to enforce non-root execution policies, ensuring compliance is baked into your cluster setup. • CICD Pipeline Security Scans: Integrate security scanners like Trivy or Kubeaudit into your CI/CD pipelines to identify and block image builds that require root privileges, ensuring only compliant images are created. • Container Security Contexts: Use Kubernetes securityContext to explicitly define non-root user settings (runAsUser, runAsGroup, allowPrivilegeEscalation) in your manifests, and enforce their use through tools like OPA/Gatekeeper policies in your GitOps workflow.
Explore categories
- Hospitality & Tourism
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- 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
- Healthcare
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Career
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development