惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recorded Future
Recorded Future
Security Archives - TechRepublic
Security Archives - TechRepublic
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Jina AI
Jina AI
I
InfoQ
D
DataBreaches.Net
人人都是产品经理
人人都是产品经理
腾讯CDC
GbyAI
GbyAI
V
Visual Studio Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Microsoft Azure Blog
Microsoft Azure Blog
F
Fortinet All Blogs
博客园 - 聂微东
美团技术团队
The Register - Security
The Register - Security
Engineering at Meta
Engineering at Meta
Apple Machine Learning Research
Apple Machine Learning Research
雷峰网
雷峰网
S
Schneier on Security
量子位
A
About on SuperTechFans
H
Help Net Security
MongoDB | Blog
MongoDB | Blog
S
SegmentFault 最新的问题
Know Your Adversary
Know Your Adversary
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
Simon Willison's Weblog
Simon Willison's Weblog
PCI Perspectives
PCI Perspectives
B
Blog
K
Kaspersky official blog
V
Vulnerabilities – Threatpost
aimingoo的专栏
aimingoo的专栏
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
G
Google Developers Blog
L
LINUX DO - 最新话题
Forbes - Security
Forbes - Security
AWS News Blog
AWS News Blog
P
Palo Alto Networks Blog
Security Latest
Security Latest
爱范儿
爱范儿
Attack and Defense Labs
Attack and Defense Labs
IT之家
IT之家
L
LINUX DO - 热门话题
D
Docker
P
Proofpoint News Feed
Y
Y Combinator Blog
P
Proofpoint News Feed

Learn Cloud Native

Agentgateway rate limiting for agents | Learn Cloud Native Local development with coding agents on Kubernetes using Signadot | Learn Cloud Native cuenv: one typed file for your whole project | Learn Cloud Native Preflight: AI Code Review Before You Push Anatomy of AI Agents Accessing Google Drive from Next.js Deploying to Fly.io using Dagger and Github Top Cloud-Native & Kubernetes Certifications [2026 Guide] Rapid microservices development with Signadot How to prepare for Istio certified associate exam (ICA) Global Rate Limiting in Istio with Envoy Rate Limit Service My Journey with Istio: From Incubation to Graduation Cilium Network Policy Tutorial: Secure Kubernetes Step by Step Kubernetes Networking: How kube-proxy and iptables Work Istio ServiceEntry: DNS vs. STATIC Resolution & Endpoints Explained Apply an Istio DestinationRule Globally (Mesh-Wide) Istio Rate Limiting: Configure a Local Rate Limiter in Envoy How to expose custom ports on Istio ingress gateway Portainer Tutorial: A Web UI for Kubernetes & Containers Traefik Proxy 2.x and TLS 101 Kubernetes CLI (kubectl) tips you didn't know about Setting up SSL certificates with Istio Gateway ArgoCD Best Practices You Should Know 在 OCI Ampere A1 计算实例上运行 AI Running AI On OCI Ampere A1 Instance How to Deploy Traefik Proxy Using Flux and GitOps Principles Firebase Emulators with Next.js: Local Setup Guide Running Hugo on free Ampere VM (Oracle Cloud Infrastructure) How to use kwatch to detect crashes in Kubernetes clusters Continuous profiling in Kubernetes using Pyroscope Monitoring containers with cAdvisor Creating a Kubernetes cluster in Google Cloud (LAB) Your first Kubernetes Pod and ReplicaSet (LABS) Container Lifecycle Hooks Maybe Convert Wasm Extension Config? GetIstio - CLI, training, and community Attach multiple VirtualServices to Istio Gateway Kubernetes Volumes Explained: Keep Data Beyond the Pod Send a Slack message when Docker images are updated Kubernetes Network Policy Ambassador Container Pattern Start Kubernetes Release Sidecar Container Pattern Kubernetes Init Containers Deploying multiple Istio Ingress Gateways Branch by Abstraction Pattern The Strangler Pattern Kubernetes Development Environment with Skaffold Securing Kubernetes Ingress with Ambassador and Let's Encrypt All About the Ingress Resource Getting started with Kubernetes Horizontal partitioning in MongoDB Docker image tagging scheme Six things to keep in mind when working with Dockerfiles Beginners guide to Docker Beginners guide to gateways and proxies Deploy and Operate Multiple Istio Meshes in one Kubernetes Cluster Managing service meshes with Meshery Circuit Breaking in Istio Explained Build and push your Docker images using Github Actions Kubernetes and Istio service mesh workshop materials Build Netlify-like deployment for React app using Kubernetes pods Six exciting enhancements in Istio 1.4.0 Fallacies of Distributed Systems CAP Theorem Explained Master the Kubernetes CLI (kubectl) - Cheatsheet Minikube Basics and How to Get Started with Kubernetes 5 Tips to Be More Productive with Kubernetes What are sticky sessions and how to configure them with Istio? Debugging Kubernetes applications using Istio Kubernetes Ingress and Istio Gateway Resource Zero Downtime Releases using Kubernetes and Istio Traffic Mirroring with Istio Service Mesh Expose a Kubernetes service on your own custom domain
How to quarantine Kubernetes pods?
Peter Jausovec · 2020-06-14 · via Learn Cloud Native

I wanted to share one quick tip on how you can quarantine your Kubernetes pods.

You would use this if you want to investigate the containers within a pod, but you don't want them to be part of the Kubernetes Service. You don't want to debug something while the traffic might still be flowing to that container.

How to do it?

A way to quarantine or remove a pod from the ReplicaSet is by updating the labels on that pod. Once you do that the ReplicaSet will not be in control of that pod anymore.

Let's look at a quick example. I have deployed a Hello World application and I have 5 pods running in my cluster:

$ kubectl get pods --show-labels
NAME                           READY   STATUS    RESTARTS   AGE
hello-world-5fd44c56d7-55hmc   1/1     Running   0          5m27s   app=hello-world,pod-template-hash=5fd44c56d7
hello-world-5fd44c56d7-66rp6   1/1     Running   0          10m     app=hello-world,pod-template-hash=5fd44c56d7
hello-world-5fd44c56d7-d8g4j   1/1     Running   0          2d23h   app=hello-world,pod-template-hash=5fd44c56d7
hello-world-5fd44c56d7-fv7wg   1/1     Running   0          10m     app=hello-world,pod-template-hash=5fd44c56d7
hello-world-5fd44c56d7-t7644   1/1     Running   0          10m     app=hello-world,pod-template-hash=5fd44c56d7

You can see from the output that there's only one label on the pods - app=hello-world. To quarantine one of the pods we need to update that label.

I'll pick the pod hello-world-5fd44c56d7-55hmc and update the value of the app label to debug:

kubectl label pod hello-world-5fd44c56d7-55hmc app=debug --overwrite

I am using the label command with the resource and the name of the resource. Next, I am specifying the label I want to add or update (app=debug) and finally, I need to specify --overwrite because label app already exists.

$ kubectl get pod --show-labels
NAME                           READY   STATUS    RESTARTS   AGE
hello-world-5fd44c56d7-2ssww   1/1     Running   0          52s     app=hello-world,pod-template-hash=5fd44c56d7
hello-world-5fd44c56d7-55hmc   1/1     Running   0          9m13s   app=debug,pod-template-hash=5fd44c56d7
hello-world-5fd44c56d7-66rp6   1/1     Running   0          14m     app=hello-world,pod-template-hash=5fd44c56d7
hello-world-5fd44c56d7-d8g4j   1/1     Running   0          2d23h   app=hello-world,pod-template-hash=5fd44c56d7
hello-world-5fd44c56d7-fv7wg   1/1     Running   0          14m     app=hello-world,pod-template-hash=5fd44c56d7
hello-world-5fd44c56d7-t7644   1/1     Running   0          14m     app=hello-world,pod-template-hash=5fd44c56d7

After you've changed the label, you will notice that ReplicaSet creates a new pod, but the pod with name hello-world-5fd44c56d7-55hmc stays around. Now you can inspect and debug the pod without impacting anything.