<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shubham </title>
    <description>The latest articles on DEV Community by Shubham  (@pareekplatform).</description>
    <link>https://dev.to/pareekplatform</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1147935%2F4cbe7197-b86f-421a-8a43-c16a1a382f00.png</url>
      <title>DEV Community: Shubham </title>
      <link>https://dev.to/pareekplatform</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pareekplatform"/>
    <language>en</language>
    <item>
      <title>Kubernetes Node Management - Drain, Cordon and Uncordon</title>
      <dc:creator>Shubham </dc:creator>
      <pubDate>Mon, 21 Jul 2025 11:10:08 +0000</pubDate>
      <link>https://dev.to/pareekplatform/kubernetes-node-management-drain-cordon-and-uncordon-5geh</link>
      <guid>https://dev.to/pareekplatform/kubernetes-node-management-drain-cordon-and-uncordon-5geh</guid>
      <description>&lt;p&gt;Most Kubernetes engineers don’t start their day expecting to drain a node, but they often end up doing just that. Managing node availability becomes routine work that directly affects workload stability and uptime. You’ll often use drain, cordon, and uncordon when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scaling a cluster&lt;/li&gt;
&lt;li&gt;Preparing for a node upgrade&lt;/li&gt;
&lt;li&gt;Patching OS level vulnerabilities&lt;/li&gt;
&lt;li&gt;Replacing underlying infrastructure&lt;/li&gt;
&lt;li&gt;Investigating issues on a specific node&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s go through how these actually behave, with visual examples.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1. DRAIN&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;kubectl drain&lt;/strong&gt; command is used when you want to safely evict all running pods from a node and prevent new ones from being scheduled on it. This is typically used during node maintenance, upgrades, or when preparing to decommission a node.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fntg0hef3dk4rw9gikz1w.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fntg0hef3dk4rw9gikz1w.jpg" alt=" " width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you run &lt;strong&gt;kubectl drain node2&lt;/strong&gt;, Kubernetes performs two actions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It marks the node as unschedulable (SchedulingDisabled).&lt;/li&gt;
&lt;li&gt;It evicts all non-daemonset pods from the node.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffzbh02imjumg6j4pf4jc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffzbh02imjumg6j4pf4jc.jpg" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before Drain:&lt;/strong&gt; All three nodes are healthy and ready to accept pods. node2 is running Pod C and Pod D.&lt;br&gt;
Once kubectl drain node2 is executed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pod C is moved to node1.&lt;/li&gt;
&lt;li&gt;Pod D is moved to node3.&lt;/li&gt;
&lt;li&gt;node2 is marked as SchedulingDisabled so no new pods are placed there.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Things I learnt after burn out:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use --ignore-daemonsets or the command fails if daemonset pods are present.&lt;/li&gt;
&lt;li&gt;Pods using emptyDir lose all data when evicted, even if they come back quickly.&lt;/li&gt;
&lt;li&gt;If a PodDisruptionBudget is set, drain can block until it’s safe to evict.&lt;/li&gt;
&lt;li&gt;Hanging drains are usually due to finalizers or stuck shutdown hooks. Use --force only if you understand the risk.&lt;/li&gt;
&lt;li&gt;Drain marks the node as unschedulable. You must run uncordon manually to bring it back.&lt;/li&gt;
&lt;li&gt;Draining nodes with system pods and no tolerations can silently break networking or DNS.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2. Cordon&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The kubectl cordon command is used when you want to stop new pods from being scheduled on a node, &lt;strong&gt;&lt;u&gt;but keep existing pods running&lt;/u&gt;&lt;/strong&gt;. This is often done before maintenance, scaling operations, or selective upgrades where you don’t want to disrupt workloads immediately.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvjmsfhc61kb9tks96kuk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvjmsfhc61kb9tks96kuk.jpg" alt=" " width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>sre</category>
      <category>cloud</category>
    </item>
    <item>
      <title>How Kubernetes Calculates Access Permissions Using RBAC Rules</title>
      <dc:creator>Shubham </dc:creator>
      <pubDate>Mon, 14 Jul 2025 10:18:44 +0000</pubDate>
      <link>https://dev.to/pareekplatform/how-kubernetes-calculates-access-permissions-using-rbac-rules-14dj</link>
      <guid>https://dev.to/pareekplatform/how-kubernetes-calculates-access-permissions-using-rbac-rules-14dj</guid>
      <description>&lt;p&gt;RBAC, or Role-Based Access Control, is a critical concept every DevOps and Cloud Engineer must understand. It defines who can perform what actions on which resources.&lt;/p&gt;

&lt;p&gt;Whether managing Kubernetes, cloud accounts, or CI/CD pipelines, it brings structure to access control, makes permissions predictable, and helps teams manage security at scale.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1y5f11ystucvjtozyagj.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1y5f11ystucvjtozyagj.jpg" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When a user, service account, or process tries to perform an action (verb) on a resource (like deployments) in a namespace, Kubernetes uses the following flow to determine if the action is allowed:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fun62z0jggrphlxx4uqqk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fun62z0jggrphlxx4uqqk.jpg" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. API Server Receives the Request&lt;/strong&gt;&lt;br&gt;
The request could be: GET /apis/apps/v1/namespaces/dev/deployments/nginx-deploy&lt;/p&gt;

&lt;p&gt;It includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verb: get&lt;/li&gt;
&lt;li&gt;Resource: deployments&lt;/li&gt;
&lt;li&gt;Namespace: dev&lt;/li&gt;
&lt;li&gt;User identity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Authentication&lt;/strong&gt;&lt;br&gt;
The API server authenticates the request using one of the supported methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Client certificate authentication from the kube-apiserver configuration&lt;/li&gt;
&lt;li&gt;Bearer tokens (including service account tokens)&lt;/li&gt;
&lt;li&gt;OIDC tokens configured with an identity provider&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For this example, the identity resolved is:&lt;br&gt;
User = &lt;a href="mailto:pareek.platform@gmail.com"&gt;pareek.platform@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Authorization&lt;/strong&gt;&lt;br&gt;
The RBAC authorizer processes the authenticated identity and evaluates it against:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;RoleBindings and ClusterRoleBindings present in etcd.&lt;/li&gt;
&lt;li&gt;Corresponding Roles or ClusterRoles defined in the cluster.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Role allowing get on deployments in namespace dev
kind: Role
metadata:
  namespace: dev
  name: view-deployments
rules:
- apiGroups: ["apps"]
  resources: ["deployments"]
  verbs: ["get", "list"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# RoleBinding assigning above role to user from techopsexamples
kind: RoleBinding
metadata:
  name: deployment-reader
  namespace: dev
subjects:
- kind: User
  name: pareek.platform@gmail.com
roleRef:
  kind: Role
  name: view-deployments
  apiGroup: rbac.authorization.k8s.io
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;4. Match Rules&lt;/strong&gt;&lt;br&gt;
The RBAC authorizer iterates through all applicable rules in the matched Roles or ClusterRoles. Checks whether any rule allows the verb on the resource in the given namespace&lt;/p&gt;

&lt;p&gt;Each rule contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;verbs (e.g., get, list)&lt;/li&gt;
&lt;li&gt;resources (e.g., deployments)&lt;/li&gt;
&lt;li&gt;apiGroups (e.g., apps)&lt;/li&gt;
&lt;li&gt;resourceNames (optional, e.g., only certain deployments)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. Decision&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If any rule matches, the RBAC authorizer grants access&lt;/li&gt;
&lt;li&gt;If no rule matches, the API server returns 403 Forbidden&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Test the calculation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl auth can-i get deployments --as 
pareek.platform@gmail.com --namespace dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>permissions</category>
      <category>learning</category>
    </item>
    <item>
      <title>Starting up with Kubernetes</title>
      <dc:creator>Shubham </dc:creator>
      <pubDate>Thu, 30 Jan 2025 10:06:35 +0000</pubDate>
      <link>https://dev.to/pareekplatform/starting-up-with-kubernetes-1jae</link>
      <guid>https://dev.to/pareekplatform/starting-up-with-kubernetes-1jae</guid>
      <description>&lt;p&gt;If you are starting up with Kubernetes or working with it then it is for you.&lt;br&gt;
Someone is digging into Kubernetes concepts, tools, and best practices – so you don’t have to.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here are 20 must-know updates and tips to get started with Kubernetes:&lt;/strong&gt; &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Always start with &lt;code&gt;kubectl&lt;/code&gt; – it's your gateway to the cluster. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use &lt;strong&gt;Minikube&lt;/strong&gt; or Kind to practice Kubernetes locally. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Master the &lt;strong&gt;YAML syntax&lt;/strong&gt; – it's everywhere in Kubernetes. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Learn the difference between &lt;strong&gt;Deployments, StatefulSets, and DaemonSets.&lt;/strong&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Namespace&lt;/strong&gt; everything to avoid conflicts in multi-team setups. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use &lt;strong&gt;ConfigMaps and Secrets&lt;/strong&gt; to separate configuration from code. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set up resource &lt;strong&gt;requests/limits&lt;/strong&gt; to prevent pod starvation. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Understand Kubernetes Services – &lt;strong&gt;ClusterIP, NodePort, and LoadBalancer.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Learn about &lt;strong&gt;Ingress&lt;/strong&gt; for HTTP routing into your cluster. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use &lt;strong&gt;liveness and readiness&lt;/strong&gt; probes to manage container health.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Avoid storing credentials in plain YAML files – use &lt;strong&gt;Secrets&lt;/strong&gt; instead. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Familiarize yourself with &lt;strong&gt;Helm&lt;/strong&gt; for managing application releases. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explore &lt;strong&gt;Kustomize&lt;/strong&gt; for environment-specific configuration. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use &lt;strong&gt;metrics-server&lt;/strong&gt; for resource monitoring. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set up Role-Based Access Control (&lt;strong&gt;RBAC&lt;/strong&gt;) for secure operations. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Start with a simple &lt;strong&gt;CNI plugin&lt;/strong&gt; like Flannel for networking. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use &lt;strong&gt;Kubernetes Dashboard&lt;/strong&gt; cautiously – it's great for beginners but can expose your cluster. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Experiment with &lt;strong&gt;auto-scaling&lt;/strong&gt; – both HPA (pods) and Cluster Autoscaler (nodes). &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Regularly &lt;strong&gt;clean up&lt;/strong&gt; unused resources like pods, services, and images. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Document&lt;/strong&gt; everything – Kubernetes has a steep learning curve.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Save this one for your reference.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Would you like me to expand on any specific point?&lt;/p&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>sre</category>
      <category>learning</category>
    </item>
    <item>
      <title>5 Trending AI Tools</title>
      <dc:creator>Shubham </dc:creator>
      <pubDate>Tue, 29 Oct 2024 09:54:31 +0000</pubDate>
      <link>https://dev.to/pareekplatform/5-trending-ai-tools-4pc2</link>
      <guid>https://dev.to/pareekplatform/5-trending-ai-tools-4pc2</guid>
      <description>&lt;p&gt;We are covering innovative tools that enhance productivity and streamline complex tasks. In this article, we explore five trending AI tools that are making waves in various sectors, offering unique solutions to everyday challenges.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.anthropic.com/news/3-5-models-and-computer-use" rel="noopener noreferrer"&gt;&lt;strong&gt;1. Claude Computer Use:&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
Give Claude the power to view your screen, click, type, and execute tasks.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Applications:&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Coding&lt;/strong&gt;&lt;br&gt;
Claude models are constantly improving on coding, math, and reasoning. It's latest model, Claude 3.5 Sonnet, can be instructed to write, edit, and run code with strong troubleshooting capabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Productivity&lt;/strong&gt;&lt;br&gt;
Claude can extract relevant information from business emails and documents, categorize and summarize survey responses, and wrangle reams of text with high speed and accuracy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Customer support&lt;/strong&gt;&lt;br&gt;
Claude can handle ticket triage, and on-demand complex inquiries using rich context awareness, and multi-step support workflows—all with a casual tone and conversational responses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It’s Trending:&lt;/strong&gt;&lt;br&gt;
Claude is becoming popular due to its user-friendly interface and ability to handle various tasks with precision, making it highly versatile for both individuals and businesses.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pricingmaker.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;2. Pricing Maker&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
Pricing Maker generates prices for your product or SaaS by AI.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Applications:&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
&lt;strong&gt;Dynamic Pricing:&lt;/strong&gt; Retailers and e-commerce businesses can use Pricing Maker to adjust prices dynamically based on demand, seasonality, and competitor activity.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Revenue Management:&lt;/strong&gt; Businesses in industries like hospitality or SaaS can leverage the tool to optimize subscription models.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Market Insights:&lt;/strong&gt; The AI analyzes competitor pricing and trends, offering insights that help businesses position their products or services effectively.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why It’s Trending:&lt;/strong&gt;&lt;br&gt;
In a competitive marketplace, pricing is a critical factor. Pricing Maker’s AI-powered approach allows businesses to make data-backed decisions quickly, ensuring they stay ahead of the curve.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://testflight.apple.com/join/UVi8VAqb?ref=producthunt" rel="noopener noreferrer"&gt;&lt;strong&gt;3. Supafit&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
Supafit is the AI companion that guides you on your fitness journey, coaching and empowering you to self-serve your way toward sustainable progress. Daily and Weekly Reports provide actionable recommendations for you to reach your goals efficiently.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Applications:&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Personalized Workouts:&lt;/strong&gt; Supafit designs custom fitness programs based on user data, including body metrics, workout history, and personal goals.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Diet and Nutrition:&lt;/strong&gt; It provides AI-generated meal plans that match the user’s fitness objectives, whether it’s weight loss, muscle gain, or maintaining a balanced lifestyle.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Real-time Feedback:&lt;/strong&gt; The app tracks users’ progress and adjusts workouts accordingly, providing real-time feedback to optimize performance and prevent injuries.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why It’s Trending:&lt;/strong&gt;&lt;br&gt;
With the growing emphasis on health and wellness, Supafit stands out by combining AI technology with personalized fitness plans, making it easier for users to achieve their goals without needing personal trainers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://fillgenius.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;4. Fill Genius&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
Fill Genius is a tool to automate form-filling in seconds with AI.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Applications:&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Product Listing:&lt;/strong&gt; Quickly fill out product details across multiple directories.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;VC Pitch Deck Forms:&lt;/strong&gt; Save time when submitting the same information to different investors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Job Applications:&lt;/strong&gt; Avoid filling out repetitive forms for job applications with auto-populated fields.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why It’s Trending:&lt;/strong&gt;&lt;br&gt;
In a world that relies heavily on paperwork and forms, Fill Genius brings automation to mundane tasks, saving significant time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.loomos.co/login" rel="noopener noreferrer"&gt;&lt;strong&gt;5. Loomos&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
Through Loomos you can convert rough Loom recordings into professional videos. It can transform raw screen recordings into studio-quality videos in a single click. &lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Applications:&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AI-Powered Transcript Editing:&lt;/strong&gt; Edit your transcript yourself, or use AI to generate an improved version automatically. Our AI cleans up 'uhms' and improves grammar for a polished result.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Aesthetic Background Images:&lt;/strong&gt; Enhance your videos with beautiful background images to create a polished look.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multilingual Translation &amp;amp; AI Voiceovers:&lt;/strong&gt; Translate to multiple languages and select from a variety of AI voiceovers that sound professional yet human-like, with different accents available.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why It’s Trending:&lt;/strong&gt;&lt;br&gt;
With the rise of remote work, Loomos is quickly becoming an essential tool for professionals who want to stay organized and ensure that meetings lead to actionable results. &lt;/p&gt;

&lt;p&gt;By incorporating these trending AI tools into your workflow, you can stay ahead of the curve and maximize efficiency in your personal or professional life.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>aitools</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Best Tool for Query anything with SQL</title>
      <dc:creator>Shubham </dc:creator>
      <pubDate>Tue, 29 Oct 2024 04:54:07 +0000</pubDate>
      <link>https://dev.to/pareekplatform/best-tool-for-query-anything-with-sql-3lpi</link>
      <guid>https://dev.to/pareekplatform/best-tool-for-query-anything-with-sql-3lpi</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Query anything (JSON, Salesforce, GitHub, Airtable, etc.) with SQL and visualize your data with any MySQL-compatible BI tool.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Anyquery is a SQL query engine that allows you to run SQL queries on pretty much anything. It supports querying JSON, CSV, Parquet, SQLite, Airtable bases, Google Sheets, Notion databases, logs file using Grok, and more. It also supports running SQL queries on remote files (HTTP, S3, GCS) and local apps (Apple Notes, Apple Reminders, Google Chrome Tabs, etc.). It's built on top of SQLite and uses plugins to extend its functionality.&lt;/p&gt;

&lt;p&gt;Moreover, it can act as a MySQL server, allowing you to run SQL queries from your favorite MySQL-compatible client (e.g. Looker Studio, DBeaver, TablePlus, Metabase, etc.).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh68q99gf6xm2j6oomp52.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh68q99gf6xm2j6oomp52.png" alt="Image description" width="800" height="515"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Anyquery is plugin-based, and you can install plugins to extend its functionality. You can install plugins from the &lt;a href="https://anyquery.dev/integrations" rel="noopener noreferrer"&gt;official registry&lt;/a&gt; or create your own. Anyquery can also load any &lt;a href="https://anyquery.dev/docs/usage/plugins#using-sqlite-extensions" rel="noopener noreferrer"&gt;SQLite extension&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can refer to the link below for detailed information and an installation guide. Also if you want to contribute you can refer Contributing section. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/julien040/anyquery?tab=readme-ov-file" rel="noopener noreferrer"&gt;*&lt;em&gt;Try it out --&amp;gt; *&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tooling</category>
      <category>sql</category>
      <category>devops</category>
      <category>powerfuldevs</category>
    </item>
    <item>
      <title>7 Kubernetes Security Best Practices in 2024</title>
      <dc:creator>Shubham </dc:creator>
      <pubDate>Tue, 29 Oct 2024 04:42:31 +0000</pubDate>
      <link>https://dev.to/pareekplatform/7-kubernetes-security-best-practices-in-2024-5888</link>
      <guid>https://dev.to/pareekplatform/7-kubernetes-security-best-practices-in-2024-5888</guid>
      <description>&lt;p&gt;Kubernetes (K8S) has revolutionized software development, but managing such a complex system with numerous components can be challenging. Fortunately, there are several best practices your team can adopt to secure your K8S environment and reduce your attack surface. By implementing these Kubernetes security best practices, you'll not only enhance your cybersecurity defenses but also improve various other business processes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Adopt a Zero Trust Architecture&lt;/strong&gt;&lt;br&gt;
Kubernetes systems contain a large number of clusters and nodes, all of which can talk to each other. That makes it easy for attackers to move laterally across your network and cause damage, so it's simply too dangerous to assume an access request is authorized just because it's already on the inside.&lt;/p&gt;

&lt;p&gt;Zero Trust architecture employ a "never trust, always verify" approach to network validation, and they're essential for securing Kubernetes platforms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Implement Least Privilege Access&lt;/strong&gt;&lt;br&gt;
Zero Trust architecture uses the least privilege principle to assess the legitimacy of access requests. This principle grants your users the bare minimum amount of access that they need to perform their tasks, preventing them from accessing unauthorized resources.&lt;/p&gt;

&lt;p&gt;To optimize your Kubernetes cybersecurity, implement a least privilege-based access management system. Structure your permission levels according to the bare minimum access necessary for users to do their work, and disallow access to anything more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Use Multi-Factor Authentication (MFA)&lt;/strong&gt;&lt;br&gt;
Multi-factor authentication adds an extra layer of cybersecurity to your K8S platform. A simple password is no longer enough in today's threat landscape, and MFA requires users to provide additional information to log in to your system. Some common types of MFA are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SMS/email&lt;/li&gt;
&lt;li&gt;Authenticators&lt;/li&gt;
&lt;li&gt;Biometrics (fingerprints, retinal scans, voice patterns, user behavior)&lt;/li&gt;
&lt;li&gt;Digital Certificates&lt;/li&gt;
&lt;li&gt;Security Tokens&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://security.googleblog.com/2019/05/new-research-how-effective-is-basic.html" rel="noopener noreferrer"&gt;Research from Google&lt;/a&gt; has shown that MFA can reduce the likelihood of a breach by over 99% in some cases. The exact numbers may vary based on the configuration of your K8S environment, but one thing is clear: Integrating MFA into your Kubernetes system can significantly reduce the likelihood of a breach. If you want to strengthen your K8S system, you'll want to implement MFA. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Regularly Update and Patch Clusters&lt;/strong&gt;&lt;br&gt;
Attackers often attempt to exploit long-standing vulnerabilities, especially those that could have been resolved with an update or patch. Stale Kubernetes containers may still possess these vulnerabilities, leaving your network exposed.&lt;/p&gt;

&lt;p&gt;Updating your clusters and frequently applying patches are essential ways of remediating vulnerabilities. The exact frequency may vary with your application, but make routine patches and updates a part of your K8S security best practices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Implement Pod Security Standards&lt;/strong&gt;&lt;br&gt;
Kubernetes' &lt;a href="https://kubernetes.io/docs/concepts/security/pod-security-standards/" rel="noopener noreferrer"&gt;Pod Security Standards&lt;/a&gt; put forth three broad policies to outline where an organization's needs lie on the security spectrum. They are:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Privileged:&lt;/strong&gt; Provides the broadest possible level of permissions. &lt;br&gt;
&lt;strong&gt;- Baseline:&lt;/strong&gt; Allows the default (minimally specified) pod configuration.&lt;br&gt;
&lt;strong&gt;- Restricted:&lt;/strong&gt; The most heavily controlled policy, it follows current pod hardening best practices. &lt;/p&gt;

&lt;p&gt;By applying Pod Security Standards to your K8S environment, you can lay a foundation for how to restrict pod behavior. This minimizes the risk of a breach or unauthorized lateral movement and enhances security across each pod and cluster in your environment. As you implement your Kubernetes security best practices, consider using the Pod Security Standards to lay out a broad framework for your operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Implement Role-Based Access Control (RBAC)&lt;/strong&gt;&lt;br&gt;
Role-Based Access Control (RBAC) is a highly granular access control method that restricts your users from certain assets based on their position within your organization. It grants users access only to the most essential resources they need to perform their tasks and reduces the likelihood of an unauthorized user gaining access to a Kubernetes node or cluster and then moving laterally to breach other assets. &lt;/p&gt;

&lt;p&gt;RBAC should be prioritized as a Kubernetes security best practice. The process can take some know-how, so consider using a third-party solution with the expertise that can simplify the process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Use Network Policies to Control Traffic&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/" rel="noopener noreferrer"&gt;Network policies&lt;/a&gt; restrict which entities your pod is allowed to communicate with. Kubernetes bases its network policies on three identifiers, which serve as criteria for assessing whether you can share information between pods. They are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Other allowable pods&lt;/li&gt;
&lt;li&gt;Allowable namespaces&lt;/li&gt;
&lt;li&gt;IP blocks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With these policies, your team can monitor your network traffic and discern between active and permissible traffic, which helps you identify network anomalies and areas of unnecessarily granted permission. Security teams should implement network policies to regulate how your pods communicate and who they can communicate with so you can keep your network secure.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>devsecops</category>
      <category>sre</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>How to Fix Kubernetes Node Disk Pressure</title>
      <dc:creator>Shubham </dc:creator>
      <pubDate>Mon, 28 Oct 2024 11:00:49 +0000</pubDate>
      <link>https://dev.to/pareekplatform/how-to-fix-kubernetes-node-disk-pressure-47nc</link>
      <guid>https://dev.to/pareekplatform/how-to-fix-kubernetes-node-disk-pressure-47nc</guid>
      <description>&lt;p&gt;Imagine you deploy an application, but after a few days, it starts throwing warnings like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Warning  NodePressure  [timestamp]  kubelet  Node [node-name] status is now: NodeHasDiskPressure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your application slows, pods get evicted, and new ones fail to schedule. This common error in Kubernetes is known as Node Disk Pressure, and if left unchecked, it can severely impact application performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Kubernetes Node Disk Pressure?&lt;/strong&gt;&lt;br&gt;
Node Disk Pressure occurs when a node’s filesystem is under strain due to low available disk space or inodes.&lt;/p&gt;

&lt;p&gt;Kubernetes automatically detects these low resource conditions and sets a NodeHasDiskPressure status.&lt;/p&gt;

&lt;p&gt;This status signals that the node has insufficient disk resources for further scheduling, evicting non-critical pods to prevent critical system disruptions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to Check Kubernetes Node Disk Pressure&lt;/strong&gt;&lt;br&gt;
How to Check Kubernetes Node Disk Pressure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl describe node [node-name]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for any nodes with the condition type DiskPressure and status True. In the output, focus on the Conditions section. &lt;br&gt;
Here’s an example where ops-node1 is experiencing disk pressure:&lt;/p&gt;

&lt;p&gt;ops-node1 Ready worker 14d v1.28.1 DiskPressure=True,MemoryPressure=False,PIDPressure=False,Ready=True&lt;/p&gt;

&lt;p&gt;Additionally, use this command to monitor disk usage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl top nodes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This shows overall CPU, memory, and disk usage for each node, helping you pinpoint where Disk Pressure is affecting your nodes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Should You Care About Node Disk Pressure?&lt;/strong&gt;&lt;br&gt;
Ignoring Disk Pressure can lead to various issues:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pod Eviction:&lt;/strong&gt; Kubernetes evicts lower-priority pods to free up disk space, which can cause disruptions in non-critical workloads.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scheduling Failures:&lt;/strong&gt; New workloads may not deploy if nodes are in a Disk Pressure state.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Performance Degradation:&lt;/strong&gt; Insufficient disk space impacts node performance and can lead to application latency.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How to Fix Kubernetes Node Disk Pressure&lt;/strong&gt;&lt;br&gt;
Here are some strategies to address Disk Pressure:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Clean Up Disk Space:&lt;/strong&gt; Clear out unused images and containers, which can take up significant space.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Increase Node Disk Size:&lt;/strong&gt; If your nodes are in a cloud environment, consider resizing disks. In AWS, for instance - Increase the EBS volume size.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Move Logs and Data to Separate Disks:&lt;/strong&gt; If your node frequently generates large logs, consider mounting a separate disk for log storage to keep system space free.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implement Resource Quotas and Limits:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: v1
kind: ResourceQuota
metadata:
  name: storage-quota
  namespace: [namespace]
spec:
  hard:
    requests.storage: 20Gi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Monitor with Alerts:&lt;/strong&gt;&lt;br&gt;
Use Prometheus or another monitoring tool to set up alerts when disk usage exceeds a threshold. This proactive approach helps you intervene before Disk Pressure arises.&lt;/p&gt;

&lt;p&gt;Hope this helps in tackling one of the common Kubernetes challenges.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>sre</category>
      <category>kubernetes</category>
      <category>help</category>
    </item>
    <item>
      <title>How To Fix OOMKilled</title>
      <dc:creator>Shubham </dc:creator>
      <pubDate>Fri, 25 Oct 2024 12:45:46 +0000</pubDate>
      <link>https://dev.to/pareekplatform/how-to-fix-oomkilled-3mp6</link>
      <guid>https://dev.to/pareekplatform/how-to-fix-oomkilled-3mp6</guid>
      <description>&lt;p&gt;OOMKilled occurs in Kubernetes when a container exceeds its memory limit or tries to access unavailable resources on a node, flagged by exit code 137.&lt;/p&gt;

&lt;p&gt;Typical OOMKilled looks like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NAME                READY     STATUS        RESTARTS     AGE
web-app-pod-1       0/1       OOMKilled     0            14m7s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;"Pods must use less memory than the total available on the node; if they exceed this, Kubernetes will kill some pods to restore balance."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Learn more about OOMKilled visually here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs4auddy9qyfdg0hngey3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs4auddy9qyfdg0hngey3.jpg" alt="Image description" width="800" height="674"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to Fix OOMKilled Kubernetes Error (Exit Code 137)&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Identify OOMKilled Event:&lt;/strong&gt; Run kubectl get pods and check if the pod status shows OOMKilled.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gather Pod Details:&lt;/strong&gt; Use kubectl to describe pod [pod-name] and review the Events section for the OOMKilled reason.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Check the Events section of the describe pod, and look for the following message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;State:          Running
       Started:      Mon, 11 Aug 2024 19:15:00 +0200
       Last State:   Terminated
       Reason:       OOMKilled
       Exit Code:    137
       ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Analyze Memory Usage:&lt;/strong&gt; Check memory usage patterns to identify if the limit was exceeded due to a spike or consistently high usage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adjust Memory Settings:&lt;/strong&gt; Increase memory limits in pod specs if necessary, or debug and fix any memory leaks in the application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prevent Overcommitment:&lt;/strong&gt; Ensure memory requests do not exceed node capacity by adjusting pod resource requests and limits.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Point worth noting:&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"If a pod is terminate due to a memory issue. it doesn’t necessarily mean it will be removed from the node. If the node’s restart policy is set to ‘Always’, the pod will attempt to restart"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To check the QoS class of a pod, run this command:&lt;/p&gt;

&lt;p&gt;kubectl get pod -o jsonpath='{.status.qosClass}' &lt;/p&gt;

&lt;p&gt;To inspect the oom_score of a pod:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run kubectl exec -it /bin/bash&lt;/li&gt;
&lt;li&gt;To see the  oom_score, run cat/proc//oom_score&lt;/li&gt;
&lt;li&gt;To see the  oom_score_adj, run cat/proc//oom_score_adj&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The pod with the lowest oom_score is the first to be terminated when the node experiences memory exhaustion.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>sre</category>
      <category>help</category>
    </item>
    <item>
      <title>K8s Plugins For Solid Security</title>
      <dc:creator>Shubham </dc:creator>
      <pubDate>Fri, 25 Oct 2024 12:24:00 +0000</pubDate>
      <link>https://dev.to/pareekplatform/k8s-plugins-for-solid-security-posture-5bje</link>
      <guid>https://dev.to/pareekplatform/k8s-plugins-for-solid-security-posture-5bje</guid>
      <description>&lt;p&gt;Kubernetes simplifies building and deploying apps via containerization, but securing your pods and containers is a different challenge.&lt;/p&gt;

&lt;p&gt;Kubernetes provides basic IP-based security for each pod, but securing your clusters requires more—network policies, access policies for individual pods, RBAC, namespace access policies, and so on.&lt;/p&gt;

&lt;p&gt;However, many open-source tools and plugins can help manage these issues.&lt;/p&gt;

&lt;p&gt;Let's explore some of the most useful ones:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg09dob1iyl5b3svsczb2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg09dob1iyl5b3svsczb2.jpg" alt="Image description" width="800" height="570"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Kube bench (⭐: 6,977 +)&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://link.mail.beehiiv.com/ls/click?upn=u001.I5dhDmlt7nI3cxy6sds7CwTg6WbK-2FgHXZZ2BsztZCENRn0hssy9y-2F-2F7hs08pD3-2BFxGTE4QWgFqu-2FOisOexTCYnbSFaPgjidgR6fUnuU8NeJIahbej-2FIGutSETVnXgy1HASCRPqGlQ0tkbQNUShSwpXeuPtQOxuxEh-2B3kETVe5b0k-2FXFHiFxo7cCmZ-2FIABh8IVuX-2Fct4vnwZJ82rKTyfK-2FPwAsySsKgPVOa7MV0VLP65xhORbxmY-2BrGM6eVcp6nAyqk03rVGLpmzLYR3psFEepTsEShxgRMc64y-2BbAhddDrw-3DDTW-_0iX4cSPnOtvHeStGBCx7QIayEZ5eEalpo6yv85Fo8bk4rPH5PdSVBaCjYBnOjHu4zmjstjpl3eQrcYOq-2FfFxpSr7AFURBD3bw2V-2FiC5IKxDncmK0rvXNTgNpx9xqqCKcS5NJItm-2F7sqOmcucZidPTHYo3wZjgzGoIIwFrLlZm8w3gi8gSgCL3yd4c2pUs9jzoxCFuAtFp6DYxILfFOBtGYU2uaOGgxmdZ5pZUupSQeE4dCGHWUdwfRblMCurNroGeqU-2FaHK65LCA8-2FlAfG-2BJA8c3RJ23hmeILfwvBZlRLzwwqYZKTV5BJZtV8wVIA0bAvlJ3N7nLyofhg06tUkSkXpx3cfvNZT9m3SKNwedXO66o9CrTO8DXGO2Q7m3CICI7MeoW8hNu-2FZjKcalaV-2Bk9kR6EQ7Mzkt7InRPeKb81it5oUFP1BoYhLif-2B3pQ-2B4Fyw" rel="noopener noreferrer"&gt;Kube-bench&lt;/a&gt; is a tool that checks Kubernetes clusters for compliance with security best practices, based on the CIS Kubernetes Benchmark. It helps identify vulnerabilities and misconfigs, providing detailed reports for remediation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;YAML-based test configuration allows easy updates as specs evolve.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;kube-bench auto-selects tests for the node's Kubernetes version.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Stern (⭐: 3,265 +)&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://link.mail.beehiiv.com/ls/click?upn=u001.I5dhDmlt7nI3cxy6sds7C-2F-2Fm9oD-2FrmORlH5RUAG14B1FMrkpIOITbOMOcqBfe4FgiCjh377CVETLlSa-2FHytFK93iYLM00V4MHGgIvcB8xCK7x8TbbLMiP7gv6k1u45He8Ciel-2BmH6wj6tyljNnOgBL6uqgK9sNhOWzO1eqYbvtLB64v8yRQs17zC6iQTNeUhkmGcPRB89ZCDSxxSiQXyfEZFK-2FT-2ByqKKttQKGoVetS7Gffzch7e1KSKGLlGjp74abCJlAClZzSFjcl9rfH9nvw-3D-3DCghR_0iX4cSPnOtvHeStGBCx7QIayEZ5eEalpo6yv85Fo8bk4rPH5PdSVBaCjYBnOjHu4zmjstjpl3eQrcYOq-2FfFxpSr7AFURBD3bw2V-2FiC5IKxDncmK0rvXNTgNpx9xqqCKcS5NJItm-2F7sqOmcucZidPTHYo3wZjgzGoIIwFrLlZm8w3gi8gSgCL3yd4c2pUs9jzoxCFuAtFp6DYxILfFOBtGYU2uaOGgxmdZ5pZUupSQeE4dCGHWUdwfRblMCurNroGeqU-2FaHK65LCA8-2FlAfG-2BJA8c3RJ23hmeILfwvBZlRLzx085Occos4olyOLJiIfQHH7cmFpKpE0-2BDjvfmjFzaeXsHZaAe8zwqIHQobN-2F4XIFtuQ9OopOnxj-2FXZxpvPOd2Yb7-2BLuZphla-2Fcbhs-2F2HhhassIbXvDtHd7FRiCvhcpVhpiqXV07ZQkc3ApS64wEc1c" rel="noopener noreferrer"&gt;Stern&lt;/a&gt; allows you to tail multiple pods and containers in Kubernetes, with color-coded log results for faster debugging.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Filters pods with regex or /, no exact pod IDs needed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tails all pod containers by default, but you can limit with the container flag.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Auto-removes deleted pods, and adds new ones as created.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Kubescore (⭐: 2,750 +)&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://link.mail.beehiiv.com/ls/click?upn=u001.I5dhDmlt7nI3cxy6sds7Cyl7hHvn9qaayFE6A26mG7elv2Xnt12LOEyIIH7BKQiZwGaYBROpz9T2EObYmAzP-2FbOvipLNaGiJQ12ZP49s3jolx1ZjwjTRE-2F3Y2KDJlfWx6WMo3deYqFH-2Bp5IdDiK7k-2B6aM734-2B6Nh-2BT9Q-2BWyfZXUffLE-2FJq4yUDhJoCaVSOY1KJ-2B4QkOcsb53njWVJWQEDbyG4Y7oYpZ3xTWz5KaWR7D22-2FdVOt7GPvAAZpHuscbnNpeV8izxIp1jDvagfW4UXA-3D-3DRLkO_0iX4cSPnOtvHeStGBCx7QIayEZ5eEalpo6yv85Fo8bk4rPH5PdSVBaCjYBnOjHu4zmjstjpl3eQrcYOq-2FfFxpSr7AFURBD3bw2V-2FiC5IKxDncmK0rvXNTgNpx9xqqCKcS5NJItm-2F7sqOmcucZidPTHYo3wZjgzGoIIwFrLlZm8w3gi8gSgCL3yd4c2pUs9jzoxCFuAtFp6DYxILfFOBtGYU2uaOGgxmdZ5pZUupSQeE4dCGHWUdwfRblMCurNroGeqU-2FaHK65LCA8-2FlAfG-2BJA8c3RJ23hmeILfwvBZlRLzzIieUucu24qVygHIPT9FpWrdAxGhX4e1ZCnUzG1Vi0HaMB07I5wPx9C8crJGqyK-2FK3VWTDNVG88XjrtONyS8J9W9gorCNeJ-2BBzhU6SOHt27yS0HXuuUiyKajyJnCRNOhXql3NKquc4hkAmLgNWDr3m" rel="noopener noreferrer"&gt;Kube-score&lt;/a&gt; is a tool that performs static code analysis of your Kubernetes object definitions, checking them against best practices to ensure proper configurations.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Evaluates resource definitions like Deployments, Services, and Ingresses for misconfigs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Supports CRD validation, checks labels, resource limits, and other key configs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Provides a score based on best practices and highlights issues.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Kubiscan (⭐: 1,313 +)&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://link.mail.beehiiv.com/ls/click?upn=u001.I5dhDmlt7nI3cxy6sds7C9BQDmNYwKjko-2BhTEs7dI3jmPP2YcZf9G8LFRZdUaI9OrMWN0J0kMZ-2BI-2BgWVd-2FgV0eT23Ox2ISND9aSja2paBeoiwu-2BhLaB7BpXF3ZYs8hKaIcfsI05CjlzTfd-2FpM8w8v3-2Bm-2B4zmZgB-2B3VekRtg7nFYwrcXsSH2kTIn-2BjIDnbbaxNUALBRZvAhrnuaQTg3H9nDxO16PRNezRsRXjBM0ZwCer4moMcWuQSt11oF5-2FZU9w8cSLo6kIlOAXZdmdrSMDIg-3D-3D6puK_0iX4cSPnOtvHeStGBCx7QIayEZ5eEalpo6yv85Fo8bk4rPH5PdSVBaCjYBnOjHu4zmjstjpl3eQrcYOq-2FfFxpSr7AFURBD3bw2V-2FiC5IKxDncmK0rvXNTgNpx9xqqCKcS5NJItm-2F7sqOmcucZidPTHYo3wZjgzGoIIwFrLlZm8w3gi8gSgCL3yd4c2pUs9jzoxCFuAtFp6DYxILfFOBtGYU2uaOGgxmdZ5pZUupSQeE4dCGHWUdwfRblMCurNroGeqU-2FaHK65LCA8-2FlAfG-2BJA8c3RJ23hmeILfwvBZlRLzygf06OLAVHwxpz1oK7Lrc-2BmtZuIyOcQBxc3b-2BPYriPsqbUc696-2F5QyTdItTxzLmXwG9ahgOtellGyZOR6G1eMLtBRae-2FVMLv6mPJEJT4uUGaLe3-2B0sFozx4dmUTjWlC-2FKAmndzl4PY83uhKPwzT1jS" rel="noopener noreferrer"&gt;KubiScan&lt;/a&gt; is a tool for scanning Kubernetes clusters for risky permissions in the RBAC authorization model.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Identify risky Pods\Containers&lt;/li&gt;
&lt;li&gt;
Identify risky Roles\ClusterRoles&lt;/li&gt;
&lt;li&gt;
Identify risky RoleBindings\ClusterRoleBindings&lt;/li&gt;
&lt;li&gt;
Identify risky Subjects (Users, Groups and ServiceAccounts)&lt;/li&gt;
&lt;li&gt;
Dump tokens from pods (all or by namespace)&lt;/li&gt;
&lt;li&gt;
CVE scan&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. Rakkess (⭐: 1,300 +)&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://link.mail.beehiiv.com/ls/click?upn=u001.I5dhDmlt7nI3cxy6sds7C6-2Fq5ob0uCCfdx0ogv-2FXbyMJPc2FUSAh-2BBmru4NxD5BmI9BWkdzOqRJxGLxNpw8z9JSTfINBq4qCGS9pXD1xQ2SFGMcUlynjyzvvECl9mUEGoWRo-2BGDKmJ3N82bVZdS6YwazqmUlAtC94PwYOV9AFpsdm0aHeG4pohSyyJ91Q1g3mK-2FYGn5E6FeWb0VHMZDznYdQ-2BQrF-2F2sO9PsfSxMm61nR92taP055cNaYowfflqMRV5dDbGqK-2BlMc9HrGuj2YArWMWvn8-2BSyxoCrmbqJdnUo-3DEvEk_0iX4cSPnOtvHeStGBCx7QIayEZ5eEalpo6yv85Fo8bk4rPH5PdSVBaCjYBnOjHu4zmjstjpl3eQrcYOq-2FfFxpSr7AFURBD3bw2V-2FiC5IKxDncmK0rvXNTgNpx9xqqCKcS5NJItm-2F7sqOmcucZidPTHYo3wZjgzGoIIwFrLlZm8w3gi8gSgCL3yd4c2pUs9jzoxCFuAtFp6DYxILfFOBtGYU2uaOGgxmdZ5pZUupSQeE4dCGHWUdwfRblMCurNroGeqU-2FaHK65LCA8-2FlAfG-2BJA8c3RJ23hmeILfwvBZlRLzyIXOmRzcaQh4BAc5NyeSCGkXvvu4rmEUgWrQxTFoKxSHYXJ36-2FdtK6EAMSHAvN-2BoeW410ON-2FvyJoPwuCgFNQMGeaAwLu80h-2BGRLAMlNM3mNED4ZLutZUOEgRPNtOBl4UT3bRgwD6V7vzBVI6tSnTNN" rel="noopener noreferrer"&gt;Rakkess&lt;/a&gt; is a kubectl plugin designed to show an access matrix for Kubernetes server resources, helping visualize and audit permissions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Shows who can access Kubernetes resources and their actions.&lt;/li&gt;
&lt;li&gt;
Audits RBAC permissions for users, groups, and service accounts in a clear matrix view.&lt;/li&gt;
&lt;li&gt;
Supports CI/CD integration for continuous RBAC audits.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Remember, we are only as strong as the weakest link.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>sre</category>
      <category>security</category>
    </item>
    <item>
      <title>Hidden Risk Of Relying On Labels In Kubernetes Security</title>
      <dc:creator>Shubham </dc:creator>
      <pubDate>Fri, 25 Oct 2024 12:05:44 +0000</pubDate>
      <link>https://dev.to/pareekplatform/hidden-risk-of-relying-on-labels-in-kubernetes-security-2gbm</link>
      <guid>https://dev.to/pareekplatform/hidden-risk-of-relying-on-labels-in-kubernetes-security-2gbm</guid>
      <description>&lt;p&gt;A while ago, a person approached my mentor with a request to optimize the network security of their Kubernetes cluster.&lt;/p&gt;

&lt;p&gt;He had a complex architecture with microservices talking to each other, and he was using NetworkPolicy to control communication.&lt;/p&gt;

&lt;p&gt;However, despite their policies, they were seeing some unintended traffic flows that left them concerned.&lt;/p&gt;

&lt;p&gt;Upon investigation, we noticed that their policies were built around &lt;a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/?utm_source=www.techopsexamples.com&amp;amp;utm_medium=newsletter&amp;amp;utm_campaign=hidden-risk-of-relying-on-labels-in-kubernetes-security&amp;amp;_bhlid=e4c98d30ecb40183f5c378b2d35f5cfc98f419db" rel="noopener noreferrer"&gt;pod labels&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here’s an example (modified the identity) of what they had in place:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: networking.k8s.io/v1

kind: NetworkPolicy

metadata:

name: access-control-database

spec:

podSelector:

matchLabels:

app: ops-examples-db

policyTypes:

- Ingress

ingress:

- from:

- podSelector:

  matchLabels:

role: admin

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The intention was clear: only pods with the role: admin label could access the ops-examples-db pod.&lt;/p&gt;

&lt;p&gt;On closer inspection, I noticed potential issues:&lt;br&gt;
&lt;strong&gt;Labels Could Be Modified:&lt;/strong&gt; Developers could label any pod as role: admin at runtime, granting it database access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Namespace Confusion:&lt;/strong&gt; Policies often overlooked namespaces, allowing a role: admin pod in the dev environment to mistakenly access production services.&lt;/p&gt;

&lt;p&gt;After discussing the concerns with that person, my mentor asked if they were using Istio.&lt;/p&gt;

&lt;p&gt;They were already using &lt;a href="https://link.mail.beehiiv.com/ls/click?upn=u001.I5dhDmlt7nI3cxy6sds7Cx-2BGz5yyFcqlBtRLQ47sHx11-2B0zlutjJ6gBgAxA7ULVBAvWh7TWRVD-2FIk7AE2tGwig-2BlxOxn47IiB7aRCsiCRgHSKjcaCGWEZQm634vod0K5llHEJJ-2FCreq-2B4BQLLRaO9nkNanUAYMWj36-2FXrWqMkEjCM68MolWkH70JvNOnJc0-2B88pKtSgD-2Bs6jlP0XJHz31iilTYFmVJBHoKZSijKyaYXJNEbZbWnqFGpGCtL9hEL8V-2Bur1hzPrEJO1L0Njg4i7fokCuHfTkWJwQkMXD3FZ1Z7vP9Td2Ovvo4cj95jGZsFe0mx9RygqFohfTEolJhOlw-3D-3DXDgs_0iX4cSPnOtvHeStGBCx7QIayEZ5eEalpo6yv85Fo8bk4rPH5PdSVBaCjYBnOjHu4b-2F98hPzYtSytzqo3Tjr4sPUcrDFz7s849RwFr5ni0m8CalETOBv9Z03JVhpMgw9qnOthd7HIaSuejtWuUobBVxQBqN0IoZMCBbDyxnfCVJbRzrlI8H8S2zeOnWBawcXda0Jm-2BTPh2sndk9Z-2BgklDdiQCj1hoU1MZJC5M40lX2hitpt28PCqO-2F5AICHlM1bRfxPAnypxLQvGIVzPzbeGIuqJxeQ6DZK-2F-2FY6K-2FkaVsHNkgrNLQeJDhVhbPkjzgZPEtt7AU-2BRjA10MeGwgIhtVfoAl4oDISdK-2FSHQ9BpmHfYTPBvNUqXZdPVfLJ7f-2BTD3VtBI90l6Jdl-2F8Z-2B7psFOkI9Wyeq-2Bj3jeiblCR8fBUuahnhZ2V-2FiakZdEv-2BFfqGoZyZ" rel="noopener noreferrer"&gt;Istio for traffic management&lt;/a&gt; but hadn’t considered it for network security.&lt;/p&gt;

&lt;p&gt;This presented a good opportunity!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Leveraging the Existing Setup:&lt;/strong&gt;&lt;br&gt;
We switched from pod labels to ServiceAccounts for more secure access control.&lt;/p&gt;

&lt;p&gt;Here’s how the updated policy looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: security.istio.io/v1

kind: AuthorizationPolicy

metadata:

name: access-control-istio

spec:

rules:

- from:

- source:

principals: ["cluster.local/ns/ops/sa/admin-service-account"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, only pods associated with the &lt;strong&gt;admin-service-account&lt;/strong&gt; could access the ops-examples-db.&lt;/p&gt;

&lt;p&gt;This was more reliable, as ServiceAccounts offer a secure identity without relying on easily altered or misconfigured labels.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why It Worked Better?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tighter Control:&lt;/strong&gt;&lt;br&gt;
ServiceAccounts eliminated the risk of unauthorized access via label changes by tying access to pod identity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Built-In Security:&lt;/strong&gt;&lt;br&gt;
Network traffic is encrypted with TLS, preserving identity across clusters and environments.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No New Tools:&lt;/strong&gt;&lt;br&gt;
The client was already using Istio, so no additional deployment was needed.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're using Kubernetes and relying on labels for access control, consider alternatives for better security and scalability.&lt;/p&gt;

&lt;p&gt;Until next time, stay secure and keep optimizing!&lt;/p&gt;

</description>
      <category>security</category>
      <category>kubernetes</category>
      <category>devops</category>
      <category>labels</category>
    </item>
    <item>
      <title>How to Set up Disk and Bandwidth Limits in Docker</title>
      <dc:creator>Shubham </dc:creator>
      <pubDate>Fri, 25 Oct 2024 11:41:55 +0000</pubDate>
      <link>https://dev.to/pareekplatform/how-to-set-up-disk-and-bandwidth-limits-in-docker-2887</link>
      <guid>https://dev.to/pareekplatform/how-to-set-up-disk-and-bandwidth-limits-in-docker-2887</guid>
      <description>&lt;p&gt;Containerized applications are increasingly popular due to their portability and scalability.&lt;/p&gt;

&lt;p&gt;However, uncontrolled use of system resources like disk space and bandwidth can lead to performance bottlenecks, security risks, and even system downtime.&lt;/p&gt;

&lt;p&gt;Here’s why setting limits becomes crucial:&lt;br&gt;
&lt;strong&gt;Disk Overrun:&lt;/strong&gt; Without limits, containers may consume excess disk space, impacting other applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Network Saturation:&lt;/strong&gt; Unregulated bandwidth can throttle the performance of critical services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security Risks:&lt;/strong&gt; Unrestricted usage increases the risk of DoS attacks or resource exhaustion.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step-by-Step Instructions for Disk and Bandwidth Limits:&lt;/strong&gt;&lt;br&gt;
In this example, let's set the disk size limit to &lt;strong&gt;10 GB&lt;/strong&gt; and the bandwidth limit to &lt;strong&gt;10 Mbps&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We've chosen Ubuntu, a widely used Linux distribution in cloud and container environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Set Disk Size Limit to 10GB:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Edit the Docker Daemon configuration file to enforce a disk limit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nano /etc/docker/daemon.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add this configuration to restrict containers to 10GB of disk space:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{

"storage-driver": "overlay2",

"storage-opts": [

"overlay2.size=10G"

]

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart Docker to apply the limit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl restart docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Set Bandwidth Limit to 10Mbps&lt;/strong&gt;&lt;br&gt;
Create a script that limits bandwidth for all Docker containers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nano /usr/local/bin/limit_bandwidth.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the following content to the script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash

INTERFACE=$(docker inspect -f '' $(docker ps -q))

tc qdisc add dev $INTERFACE root tbf rate 10mbit burst 32kbit latency 400ms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make the script executable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo chmod +x /usr/local/bin/limit_bandwidth.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a systemd service to apply the bandwidth limit automatically when Docker starts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nano /etc/systemd/system/docker-bandwidth-limit.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add this content to the service file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Unit]

Description=Limit bandwidth for Docker containers

After=docker.service

[Service]

ExecStart=/usr/local/bin/limit_bandwidth.sh

Type=oneshot

RemainAfterExit=true

[Install]

WantedBy=multi-user.target
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enable the service and start it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl daemon-reload

sudo systemctl start docker-bandwidth-limit.service

sudo systemctl enable docker-bandwidth-limit.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Verify the Limits&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Run a container above the 10GB limit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -d --storage-opt size=15G ubuntu

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error response from daemon: error creating overlay mount to /var/lib/docker/overlay2: disk quota exceeded
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Try exceeding the 10Mbps bandwidth limit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -d --cap-add=NET_ADMIN ubuntu tc qdisc add dev eth0 root tbf rate 20mbit burst 32kbit latency 400ms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: argument "20mbit" is wrong: Rate too high for configured limit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this, you create a controlled and predictable environment.&lt;/p&gt;

&lt;p&gt;Hope you find this use case helpful in your learning journey!&lt;/p&gt;

</description>
      <category>devops</category>
      <category>docker</category>
      <category>sre</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>What are Kata Containers?</title>
      <dc:creator>Shubham </dc:creator>
      <pubDate>Fri, 25 Oct 2024 10:25:53 +0000</pubDate>
      <link>https://dev.to/pareekplatform/what-are-kata-containers-514f</link>
      <guid>https://dev.to/pareekplatform/what-are-kata-containers-514f</guid>
      <description>&lt;p&gt;&lt;a href="https://link.mail.beehiiv.com/ls/click?upn=u001.I5dhDmlt7nI3cxy6sds7C3uI3dnrPs2v4ZpeM3okeW-2FY5QZuf-2FYMWwBlpEoWVkxYYPe5leyeva6u1V3kdNi2v-2BKUXz-2BHbyC04q8VVZy6PozZm70xwCYvZfyqBZRJKDJ5NmgNbaaOhxfLWpWe-2FOzdb9fcN8i0FwBcbjMcN8XBpLqlcPhOr-2FMKZjvMcS7aF18S4RHBIYd6STTlJYXJJ8tNvJ9szCCZEBb-2BY1ebWcWfoCLJn94WLGG-2BsZuj37xvJ3va0ejI_0iX4cSPnOtvHeStGBCx7QIayEZ5eEalpo6yv85Fo8bk4rPH5PdSVBaCjYBnOjHu4-2FO1L-2Fqibzr0F-2Fs447K405nsSY32reMluSPcH6J3xI2gw9-2BKq9ZvpujccDov1WBabpJ7hoZUpQl38wB7dPg8IeGoN9Y-2B-2Fmf-2FkoiIjsv7NJlLDjPhMncSn8RQ-2FA-2BDF0S4JHsFm4jUgvDuy7EtnvuseCFiYuSBVSs7Dez6HFZ-2FvniGay6yuJLMIBoFFdIc6IIV9juekZGMOBGXcxkPwi8IqeQmfSUHZxFklgHUJdFLG278Zi4tEOKgTF3lYFYId4M1QrgAz-2FMYixzGAIDKAzZwU97aWI0bVbe4FO3R5BvJdtlRX2hzXQvE-2FFx5pTnmfPmPDGgtZaoZllcj4-2FemxAEvDu07gFNWIG-2FAFq5hNxi-2Ffr8UZHZpjB-2BoNKN6UVc4jWOwih5ppRA0eN15Z-2FgMQ5hs4Bw-3D-3D" rel="noopener noreferrer"&gt;Kata Containers&lt;/a&gt; perform like containers, but provide the workload isolation and security advantages of VMs. It combines the benefits of containers and VMs.&lt;/p&gt;

&lt;p&gt;The project is managed by the &lt;a href="https://link.mail.beehiiv.com/ls/click?upn=u001.I5dhDmlt7nI3cxy6sds7Cy-2BKRyasJBfKq7zpR9jPY3-2BDGrvpcKl1bxt3cb6WEihkgiOehL83qoQMi0UlN8QcASdndVIwKI88U-2BYRTYfo-2BT3HOygag7NQEltuiFnOND9Wr4o4xD5vMAEaopmdc-2BaQ73N7TY-2FFBeN1HXSpqnTiLAMeXB1vwvTsa-2BvRSqo2E2vIo2FdG5BfxcTcGqk5kdma4MFg0dO-2FR1aCDWLdQ-2B0fV5c1gq-2FoJvdI6a0OIiWm8MBnqJhG_0iX4cSPnOtvHeStGBCx7QIayEZ5eEalpo6yv85Fo8bk4rPH5PdSVBaCjYBnOjHu4-2FO1L-2Fqibzr0F-2Fs447K405nsSY32reMluSPcH6J3xI2gw9-2BKq9ZvpujccDov1WBabpJ7hoZUpQl38wB7dPg8IeGoN9Y-2B-2Fmf-2FkoiIjsv7NJlLDjPhMncSn8RQ-2FA-2BDF0S4JHsFm4jUgvDuy7EtnvuseCFiYuSBVSs7Dez6HFZ-2FvniGay6yuJLMIBoFFdIc6IIV9juekZGMOBGXcxkPwi8IqeQmfSUHZxFklgHUJdFLG27-2Bk8wbAlblNrVp43-2Blacxb9pNyMLMe51tkkTkIax4YuPlABeKR-2BHzJKGEDTDFgyW3t5pAxuhgjfCiginlMtj34BJRgaeVBfZlaCIXSi7t5dihhrfKDcMFcUx7xPw7VBtFgxKxKyU9gSaVVFT-2FLBD94F2ix-2F0EUmHi4NmoYZq-2FXadQ-3D-3D" rel="noopener noreferrer"&gt;OpenStack Foundation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;With Kata, you can implement VM isolation at the container level and container isolation using hardware virtualization.&lt;/p&gt;

&lt;p&gt;However, in &lt;u&gt;Kubernetes&lt;/u&gt;, VM isolation applies at the &lt;u&gt;pod level&lt;/u&gt; rather than individual containers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Difference between Kata and Traditional containers:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9l6ko3h8c764592vuo3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9l6ko3h8c764592vuo3.png" alt="Image description" width="714" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see in the above image, &lt;strong&gt;Kata Containers&lt;/strong&gt; run each container inside its own virtual machine (VM) with a separate Linux kernel, providing stronger isolation.&lt;/p&gt;

&lt;p&gt;In contrast, &lt;strong&gt;traditional containers&lt;/strong&gt; share a single Linux kernel and use namespaces and cgroups for isolation. This highlights the key difference in how they handle security and isolation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefs6mma5e1n44m6wni7v.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefs6mma5e1n44m6wni7v.jpg" alt="Image description" width="800" height="606"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The architecture consists of six key components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent:&lt;/strong&gt;&lt;br&gt;
Manages container execution and communication inside the virtual machine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Runtime:&lt;/strong&gt;&lt;br&gt;
Executes container lifecycle commands, following OCI specifications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Proxy:&lt;/strong&gt;&lt;br&gt;
Facilitates communication between the runtime and the virtual machine through gRPC.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Shim:&lt;/strong&gt;&lt;br&gt;
Provides compatibility for handling I/O and process management specific to each application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Kernel:&lt;/strong&gt;&lt;br&gt;
The virtual machine’s operating system kernel, ensures isolated environments for containers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hypervisor (QEMU)&lt;/strong&gt;:&lt;br&gt;
Provides hardware virtualization, isolating containers in lightweight virtual machines.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why Kata Containers are better Secured?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Conventional containers pose security risks because they share the same OS kernel, network, and memory. A single compromised container can expose all others on the same system.&lt;/p&gt;

&lt;p&gt;Kata Containers improve security by running each container in its own virtual machine with a dedicated kernel, isolating processes, networks, and memory. They also use hardware-based isolation with virtualization extensions, adding an extra layer of protection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Points to Consider:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Only available on Linux distributions.&lt;/li&gt;
&lt;li&gt;CentOS&lt;/li&gt;
&lt;li&gt;Debian&lt;/li&gt;
&lt;li&gt;Fedora&lt;/li&gt;
&lt;li&gt;Ubuntu&lt;/li&gt;
&lt;li&gt;OpenSUSE&lt;/li&gt;
&lt;li&gt;Red Hat Enterprise Linux&lt;/li&gt;
&lt;li&gt;Still in early development, but widely adopted with promising technical foundations.&lt;/li&gt;
&lt;li&gt;Supports Kubernetes, Docker, OCI, CRI, CNI, QEMU, KVM, and OpenStack.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;installation and more &lt;a href="https://link.mail.beehiiv.com/ls/click?upn=u001.I5dhDmlt7nI3cxy6sds7C7J-2B6gJUW1eptuJrT7gKL5tE8uJFIzH69LJo8RZi1r4Iy4ITXn9eKALqhY30i7E2hqOD6AQy4keWA9qA5-2B5aTAarWLaCv0Y7PWyi7QnzTA9GXF6O9qrttSJadz2ff-2Fx-2BAi7sGP8yWw7PbiScdCj-2FBWtjIfQOJ4D961-2Bnpo6OIKd-2B-2Bu9DLIJ4aXw2Q-2FQNO2CrKMDqtog83u2Uxv7KwpnOPr7y3bZTZ6Ub9ii7vyZm0h0fGeA1-2FGvcWS5o-2FDrqCIy-2BUUxaGEToEIaueBlkKiBFdS9S7sLIlBPrl8MuB8RcQdv6NDWxdhkRtkYx9NHF3y5WSw-3D-3DRVr__0iX4cSPnOtvHeStGBCx7QIayEZ5eEalpo6yv85Fo8bk4rPH5PdSVBaCjYBnOjHu4-2FO1L-2Fqibzr0F-2Fs447K405nsSY32reMluSPcH6J3xI2gw9-2BKq9ZvpujccDov1WBabpJ7hoZUpQl38wB7dPg8IeGoN9Y-2B-2Fmf-2FkoiIjsv7NJlLDjPhMncSn8RQ-2FA-2BDF0S4JHsFm4jUgvDuy7EtnvuseCFiYuSBVSs7Dez6HFZ-2FvniGay6yuJLMIBoFFdIc6IIV9juekZGMOBGXcxkPwi8IqeQmfSUHZxFklgHUJdFLG279UDi5t545mQZW7Aug5Rg0HgwheTAkQ-2BNFam9t138vZBJHag3P6Yguz8Skc2PkOwkyd-2BUK18flQzfRPmZLbqMzJtxWdMpcX0NkTGSKzKSrrmkc2uhzwTF83hYYg5eNzY6KUY-2BexWNAgrF671RL6rmBrNmWSf7uPbwM-2Bkv230UJA-2FQ-3D-3D" rel="noopener noreferrer"&gt;details here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Kata containers are best for situations where containers need to run on different kernels, like in CI/CD, edge computing, virtualized networks, and containers as a service (CaaS).&lt;/p&gt;

&lt;p&gt;A promising prospect to try out !&lt;/p&gt;

</description>
      <category>containers</category>
      <category>devops</category>
      <category>kubernetes</category>
      <category>sre</category>
    </item>
  </channel>
</rss>
