Hi guys, let me share the technique for dropping traffic to the Pod Kubernetes. This is just a note, and maybe you need this if you have the same study case.
The study case is pretty simple, just for dropping the traffic without deleting the Pod in a short time.
- Edit your
Service
manifest, you can usekubectl edit svc yourservice
. Ref: https://jamesdefabia.github.io/docs/user-guide/kubectl/kubectl_edit/ - Change the value of
selector
, save.
selector: app.kubernetes.io/name: givewrongvalueofselector
Done, thanks…
Admin LUKMANLAB, DevOps Engineer, Site Reliability Engineer, System Administrator.