Skip to Main Content
The DevOps 2.5 Toolkit
book

The DevOps 2.5 Toolkit

by Viktor Farcic
November 2019
Intermediate to advanced content levelIntermediate to advanced
322 pages
7h 3m
English
Packt Publishing
Content preview from The DevOps 2.5 Toolkit

To replicas or not to replicas in Deployments and StatefulSets?

Knowing that HorizontalPodAutoscaler (HPA) manages auto-scaling of our applications, the question might arise regarding replicas. Should we define them in our Deployments and StatefulSets, or should we rely solely on HPA to manage them? Instead of answering that question directly, we'll explore different combinations and, based on results, define the strategy.

First, let's see how many Pods we have in our cluster right now.

 1  kubectl -n go-demo-5 get pods

The output is as follows.

NAME    READY STATUS  RESTARTS AGE
api-... 1/1   Running 0        27m
api-... 1/1   Running 2        31m
db-0    2/2   Running 0        20m
db-1    2/2   Running 0        20m
db-2    2/2   Running 0        21m

We can see that there are two replicas of ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The DevOps 2.2 Toolkit

The DevOps 2.2 Toolkit

Viktor Farcic

Publisher Resources

ISBN: 9781838647513Supplemental Content