Scaling a pod in Openshift

Scaling a pod down an up again is the same as restarting a pod, it's just that the container folks like to use fancy words:

The thing you scale down and up is a deployment, which is one abstraction above a pod.

You can get a list of deployments with:

$ oc get deployments
foo-ice-cream
$ oc scale deployment/foo-ice-cream --replicas=0

Give it a second or two, and then scale it up again to get a fresh pod with containers, fresh of any disk or in-memory state left behind that wasn't mounted or injected:

$ oc scale deployment/foo-ice-cream --replicas=1

Happy scaling!


~ /home 🏠 ~ talks 💬 ~ bash ~ craftsmanship ~ db ~ dongxi ~ emacs ~ escenic ~ iam ~ java ~ js ~ language ~ latex ~ ldap ~ life ~ linux ~ llm ~ mac-os-x ~ mt-foo ~ network ~ norsk ~ python ~ quotes ~ running ~ security ~ travel ~ unix ~ various ~ vcs ~ webdesign ~ windows ~ discoveries ~ cv 🧙 ~

Licensed under CC BY Creative Commons License ~ 📡 RSS feed ~ ✉ torstein.k.johansen @ gmail ~ 🐘 @skybert@hachyderm.io ~ 🎥 youtube.com/@skybert