Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
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
Kubernetes – An Enterprise Guide

You're reading from   Kubernetes – An Enterprise Guide Master containerized application deployments, integrate enterprise systems, and achieve scalability

Arrow left icon
Product type Paperback
Published in Aug 2024
Publisher Packt
ISBN-13 9781835086957
Length 682 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Marc Boorshtein Marc Boorshtein
Author Profile Icon Marc Boorshtein
Marc Boorshtein
Scott Surovich Scott Surovich
Author Profile Icon Scott Surovich
Scott Surovich
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

Preface 1. Docker and Container Essentials 2. Deploying Kubernetes Using KinD FREE CHAPTER 3. Kubernetes Bootcamp 4. Services, Load Balancing, and Network Policies 5. External DNS and Global Load Balancing 6. Integrating Authentication into Your Cluster 7. RBAC Policies and Auditing 8. Managing Secrets 9. Building Multitenant Clusters with vClusters 10. Deploying a Secured Kubernetes Dashboard 11. Extending Security Using Open Policy Agent 12. Node Security with Gatekeeper 13. KubeArmor Securing Your Runtime 14. Backing Up Workloads 15. Monitoring Clusters and Workloads 16. An Introduction to Istio 17. Building and Deploying Applications on Istio 18. Provisioning a Multitenant Platform 19. Building a Developer Portal 20. Other Books You May Enjoy 21. Index

Services, Load Balancing, and Network Policies

In the previous chapter, we kicked off our Kubernetes Bootcamp to give you a quick but thorough introduction to Kubernetes basics and objects. We started by breaking down the main parts of a Kubernetes cluster, focusing on the control plane and worker nodes. The control plane is the brain of the cluster, managing everything including scheduling tasks, creating deployments, and keeping track of Kubernetes objects. The worker nodes are used to run the applications, including components like the kubelet service, keeping the containers healthy, and kube-proxy to handle the network connections.

We looked at how you interact with a cluster using the kubectl tool, which lets you run commands directly or use YAML or JSON manifests to declare what you want Kubernetes to do. We also explored most Kubernetes resources. Some of the more common resources we discussed included DaemonSets, which ensure a pod runs on all or specific nodes, StatefulSets to manage stateful applications with stable network identities and persistent storage, and ReplicaSets to keep a set number of pod replicas running.

The Bootcamp chapter should have helped to provide a solid understanding of Kubernetes architecture, its key components and resources, and basic resource management. Having this base knowledge sets you up for the more advanced topics in the next chapters.

In this chapter, you’ll learn how to manage and route network traffic to your Kubernetes services. We’ll begin by explaining the fundamentals of load balancers and how to set them up to handle incoming requests to access your applications. You’ll understand the importance of using service objects to ensure reliable connections to your pods, despite their ephemeral IP addresses.

Additionally, we’ll cover how to expose your web-based services to external traffic using an Ingress controller, and how to use LoadBalancer services for more complex, non-HTTP/S workloads. You’ll get hands-on experience by deploying a web server to see these concepts in action.

Since many readers are unlikely to have a DNS infrastructure to facilitate name resolution, which is required for Ingress to work, we will manage DNS names using a free internet service, nip.io.

Finally, we’ll explore how to secure your Kubernetes services using network policies, ensuring both internal and external communications are protected.

The following topics will be covered in this chapter:

  • Introduction to load balancers and their role in routing traffic.
  • Understanding service objects in Kubernetes and their importance.
  • Exposing web-based services using an Ingress controller.
  • Using LoadBalancer services for complex workloads.
  • Deploying an NGINX Ingress controller and setting up a web server.
  • Utilizing the nip.io service for managing DNS names.
  • Securing services with network policies to protect communications.

As this chapter ends, you will understand deeply the various methods to expose and secure your workloads in a Kubernetes cluster.

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