Advanced Kubernetes: Traffic Management, Multi-Cluster Strategies, and More
Advanced topics in Kubernetes, beyond those covered in the earlier parts of this book, will be discussed in this final chapter. We will start by looking into the advanced use of Ingress for some really sophisticated routing to your Pods, followed by effective methodologies for troubleshooting Kubernetes and hardening Kubernetes security, as well as best practices for optimizing a Kubernetes setup.
This final chapter will introduce you to advanced Kubernetes traffic routing in Kubernetes using Ingress resources. In a nutshell, Ingress allows exposing your Pods running behind a Service object to the external world using HTTP and HTTPS routes. So far, we have introduced ways to expose your application using Service objects directly, especially the LoadBalancer Service. But this approach only works well in cloud environments where you have the cloud-controller-manager running. It works by configuring external load balancers to be used with this type of Service. Moreover, each LoadBalancer Service requires a separate instance of the cloud load balancer, which brings additional costs and maintenance overhead. Next, we are going to introduce Ingress and Ingress Controller, which can be used in any type of environment to provide routing and load-balancing capabilities for your application. You are also going to learn how to use the nginx web server as an Ingress Controller and how you can configure the dedicated Azure Application Gateway Ingress Controller (AGIC) for your AKS cluster.
Further, we are going to review some of the recent Kubernetes projects that include KubeVirt for virtualization and serverless solutions, such as Knative and OpenFaaS. You will also learn about ephemeral containers and how they are used in real-time troubleshooting, the role of different Kubernetes plugins, and multi-cluster management. Although we will be giving an overview of most of them, kindly note that some of these topics are only at a high level because they go beyond the detailed scope of this book.
In this chapter, we will cover the following topics:
- Advanced Traffic Routing with Ingress
- Gateway API
- Modern Advancements with Kubernetes
- Maintaining Kubernetes Clusters – Day 2 tasks
- Securing a Kubernetes Cluster – Best Practices
- Troubleshooting Kubernetes