The Book of Kubernetes by Alan Hohn
Author:Alan Hohn [Alan Hohn]
Language: eng
Format: epub, pdf
Publisher: No Starch Press
Published: 2022-09-06T00:00:00+00:00
Ingress in Production
The curl command in Listing 9-3 still looks a little strange, as weâre required to override the HTTP Host header manually. We need to perform a few additional steps to use Ingress resources to expose services in a production cluster.
First, we need our cluster to have an externally routable IP address together with a well-known name that is registered in DNS. The best way to do that is with a wildcard DNS scheme so that all hosts in a given domain are all routed to the clusterâs external IP. For example, if we own the domain cluster.example.com, we could create a DNS entry so that *.cluster.example.com routes to the clusterâs external IP address.
This approach still works with larger clusters that span multiple networks. We just need to have multiple IP addresses associated with the DNS entry, possibly using location-aware DNS servers that route clients to the closest service.
Next, we need to create an SSL certificate for our ingress controller that includes our wildcard DNS as a Subject Alternative Name (SAN). This will allow our ingress controller to provide a secure HTTP connection for external users no matter what specific service hostname they are using.
Finally, when we define our Services, we need to specify the fully qualified domain name for the host field. For the preceding example, we would specify web01.cluster.example.com rather than just web01.
After weâve performed these additional steps, any external user would be able to connect via HTTPS to the fully qualified hostname of our Service, such as https://web01.cluster.example.com. This hostname would resolve to our clusterâs external IP address, and the load balancer would route it to one of the clusterâs nodes. At that point, our ingress controller, listening on the standard port of 443, would offer its wildcard certificate, which would match what the client expects. As soon as the secure connection is established, the ingress controller would inspect the HTTP Host header and proxy a connection to the correct Service, sending back the HTTP response to the client.
The advantage of this approach is that after we have it set up, we can deploy a new Ingress resource at any time to expose a Service externally, and as long as we choose a unique hostname, it wonât collide with any other exposed Service. After the initial setup, all of the configuration is maintained within the cluster itself, and we still have a highly available configuration for all of our Services.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Disaster & Recovery | Email Administration |
Linux & UNIX Administration | Storage & Retrieval |
Windows Administration |
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7784)
Grails in Action by Glen Smith Peter Ledbrook(7699)
Configuring Windows Server Hybrid Advanced Services Exam Ref AZ-801 by Chris Gill(6580)
Azure Containers Explained by Wesley Haakman & Richard Hooper(6568)
Running Windows Containers on AWS by Marcio Morales(6098)
Kotlin in Action by Dmitry Jemerov(5068)
Microsoft 365 Identity and Services Exam Guide MS-100 by Aaron Guilmette(4923)
Combating Crime on the Dark Web by Nearchos Nearchou(4504)
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4416)
Microsoft Cybersecurity Architect Exam Ref SC-100 by Dwayne Natwick(4351)
The Ruby Workshop by Akshat Paul Peter Philips Dániel Szabó and Cheyne Wallace(4180)
The Age of Surveillance Capitalism by Shoshana Zuboff(3959)
Python for Security and Networking - Third Edition by José Manuel Ortega(3748)
Learn Windows PowerShell in a Month of Lunches by Don Jones(3510)
The Ultimate Docker Container Book by Schenker Gabriel N.;(3413)
Mastering Python for Networking and Security by José Manuel Ortega(3346)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3335)
Blockchain Basics by Daniel Drescher(3298)
Learn Wireshark by Lisa Bock(3273)
