Upgrade to Pro — share decks privately, control downloads, hide ads and more …

5 Things We Learned Not to Ignore While Scaling...

Komodor
April 24, 2022

5 Things We Learned Not to Ignore While Scaling Kubernetes Webinar DevOps.com Feb. 9th

Using Kubernetes for orchestration? Great—we hope things are running smoothly. The thing about Kubernetes, though, is that it tends to surprise you—throwing curveballs just when you think you've finally mastered the art of container management. And those curveballs usually come at you when you try to scale up. So, how can you scale K8s without striking out due to speed and reliability (not to mention sanity) issues?

Join Guy Menahem, solution architect at Komodor, as he shares some of the hard lessons he learned from his own experiences with Kubernetes, including:

- The “phantom” challenges of working with K8s
- The five key factors you can’t ignore when scaling K8s
- Best practices and tools for a smooth-running K8s system

Komodor

April 24, 2022
Tweet

More Decks by Komodor

Other Decks in Technology

Transcript

  1. Komodor <> Epsagon | May 2021 5 Things We Learned

    Not To Ignore While Scaling K8s Guy Menahem Solution Architect @ Komodor
  2. Cloud native | March 2021 • Solution Architect at Komodor,

    a startup building the first k8s-native troubleshooting platform • A developer turned solution architect • Love everything in infrastructure: storage, networks & security • All about “plan well, sleep well” Who am I?
  3. Investors | January 2021 Scaling Kubernetes is Tricky Regardless Where

    You Start From Scenario 1 Your business needs are growing, resulting in a growth of your existing Kubernetes footprint Scenario 2 You’re currently planning (or in the process of) migrating your business to Kubernetes
  4. Investors | January 2021 In the next 2-3 years, do

    you expect Kubernetes to play a larger role in your organization’s infrastructure management? Source: Pure Storage 2021 Kubernetes Adoption Survey The Role of Kubernetes is Expanding Given Its Clear Benefits What’s the biggest benefit you’ve seen for your business or team from adopting Kubernetes? 73% Faster time to deploy new apps 61% Ability to reuse application code across environments 61% Easier to update apps
  5. Investors | January 2021 But Scaling K8s Comes With Certain

    Challenges That You Shouldn’t Ignore
  6. Key Factor #1: Infrastructure Static vs Dynamic Infrastructure Plans Static

    Infrastructure Peak Capacity Day-to-Day Capacity Cluster Size Dynamic Infrastructure
  7. Key Factor #1: Infrastructure Static Infrastructure Plans Num of clusters

    Num of nodes x Find the right size for your app and nodes/instances. Here’s the most important things to consider: Application Size • Each application has its own scaling formula - you need to find yours • The right metric could be CPU, RAM, # of requests, events, response time etc Node/Instance Size • Max number of pods • Daemonsets • Eviction hard limits • Overcommitment Don’t forget to also consider your networking requirements and the number of clusters you’ll be using.
  8. Key Factor #1: Infrastructure Dynamic Infrastructure Plans • Pods based

    (HPA) or node based (cluster autoscaler) • Define your scaling metrics based on the application metrics • Scaling can be specific - node groups HPA Scale the number of pods based on metrics Cluster Autoscaler Scale the number of nodes based on pending pods
  9. Key Factor #1: Infrastructure Helpful Tool for Infrastructure Planning Learnk8s

    Kubernetes Instance Calculator https://learnk8s.io/kubernetes-instance-calculator
  10. Key Factor #2: Costs Optimizing Cloud Costs • Spot Instances

    ◦ Pros: Usually on the cheaper side ◦ Cons: Get ready for voodoo and phantom issues • On Demand Instances ◦ Pros: Stable ◦ Cons: Expensive • Mixed Instances ◦ Pros: Flexible ◦ Cons: Non-uniform voodoo and phantom issues
  11. Key Factor #2: Costs Optimizing Other 3rd Party Tool Costs

    Your 3rd party tools will also be affected, based on the subscription you have with them (monitoring, logging etc.) • More nodes -> more $$$ for nodes • More logs -> more $$$ for storage • More services -> ….
  12. Key Factor #3: Rollout & Rollback Strategic Considerations Rollout Strategies

    • Simple rollouts can be done using RollingUpdateStrategy • For complex rollouts, you’ll need more advanced tools such as ArgoRollouts Rollback Strategies • Code only rollbacks are usually pretty simple • Breaking changes, on the other hand, can turn into a nightmare
  13. Key Factor #4: Context Resource’s Metadata As Identifier • Descriptive

    metadata adds more context • Don’t forget labels and annotations • Examples to consider: Owners, department, business impact, repo, pipeline ref, code ref, related db,...
  14. Key Factor #5: Organization & Culture Factors to Consider •

    Get buy-in from dev teams • Spend time on training your dev teams • Adjust your tools to dev needs • Grant them the necessary access • Iterate together best practices
  15. Thanks for listening! Want to learn how you can troubleshoot

    K8s issues with ease? Then check us out at: www.komodor.com