Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Certified Kubernetes Administrator (CKA) Exam Guide

You're reading from   Certified Kubernetes Administrator (CKA) Exam Guide Validate your knowledge of Kubernetes and implement it in a real-life production environment

Arrow left icon
Product type Paperback
Published in Nov 2022
Publisher Packt
ISBN-13 9781803238265
Length 322 pages
Edition 1st Edition
Concepts
Arrow right icon
Author (1):
Arrow left icon
Mélony Qin Mélony Qin
Author Profile Icon Mélony Qin
Mélony Qin
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Part 1: Cluster Architecture, Installation, and Configuration
2. Chapter 1: Kubernetes Overview FREE CHAPTER 3. Chapter 2: Installing and Configuring Kubernetes Clusters 4. Chapter 3: Maintaining Kubernetes Clusters 5. Part 2: Managing Kubernetes
6. Chapter 4: Application Scheduling and Lifecycle Management 7. Chapter 5: Demystifying Kubernetes Storage 8. Chapter 6: Securing Kubernetes 9. Chapter 7: Demystifying Kubernetes Networking 10. Part 3: Troubleshooting
11. Chapter 8: Monitoring and Logging Kubernetes Clusters and Applications 12. Chapter 9: Troubleshooting Cluster Components and Applications 13. Chapter 10: Troubleshooting Security and Networking 14. Index 15. Other Books You May Enjoy Appendix - Mock CKA scenario-based practice test resolutions

Scaling applications

When our application becomes popular, in order to handle increasingly on-demand requests, we need to spin up multiple instances of applications to satisfy the workload requirements.

When you have a Deployment, scaling is achieved by changing the number of replicas. Here, you can scale a Deployment using the kubectl scale command to make this happen:

kubectl scale deployment kubeserve --replicas=6

Your output should look as follows:

deployment.apps/kubeserve scaled

If you use the kubectl get pods command now, you will see that some more copies of the pods are spinning up, as shown in the following output:

Figure 4.17 – kubectl getting the pods and showing more copies of them

Aside from manually scaling the Deployments with the kubectl scale command, we also have another way of scaling a Deployment and its ReplicaSets, which is HorizontalPodAutoscaler (HPA). Let’s take a look at the ReplicaSets first.

ReplicaSets...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime