Windows Subsystem for Linux 2 (WSL 2) Tips, Tricks, and Techniques by Stuart Leeks
Author:Stuart Leeks
Language: eng
Format: mobi, epub
Publisher: Packt Publishing Pvt Ltd
Published: 2020-10-20T16:00:00+00:00
Figure 7.7 â A screenshot showing the Kubernetes web application in the browser
This screenshot shows the web application loaded in a browser and the hostname that it displays matches one of the pod names we saw when we listed the pods after scaling the deployment. If you refresh the page a few times, you will see the name changes between the pod names we created after scaling the deployment, showing that the Kubernetes service we created is distributing the traffic between the pods.
We have been interactively running kubectl commands to create deployments and services, but a powerful aspect of Kubernetes is its support for declarative deployments. Kubernetes allows you to define objects such as deployments and services in files written in the YAML format. In this way, you can specify multiple aspects of your system and then pass the set of YAML files to Kubernetes in one go and Kubernetes will create them all. You can later update the YAML specification and pass it to Kubernetes, and it will reconcile the differences in the specification to apply your changes. An example of this is in the code accompanying the book in the chapter-07/02-deploy-to-kubernetes folder (refer to the README.md file in the folder for instructions on how to deploy).
In this section, we've taken a look at how to deploy our web application packaged as a container image using a Kubernetes deployment. We saw how this creates pods for us and allows us to dynamically scale the number of pods that we have running. We also saw how we can use Kubernetes to create a service that distributes traffic across the pods in our deployment. This service gives a logical abstraction over the pods in the deployment and handles scaling the deployment as well as pods that have restarted (for example, if it has crashed). This gives a good starting point for working with Kubernetes, and if you want to take it further, Kubernetes has a great interactive tutorial at https://kubernetes.io/docs/tutorials/kubernetes-basics/.
Note
If you are interested in digging deeper into using Docker or Kubernetes for building applications, the following links give a good starting point (with further links to other content):
https://docs.docker.com/develop/
https://kubernetes.io/docs/home/
Download
Windows Subsystem for Linux 2 (WSL 2) Tips, Tricks, and Techniques by Stuart Leeks.epub
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.
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7763)
Filmora Efficient Editing by Alexander Zacharias(5742)
The Infinite Retina by Robert Scoble Irena Cronin(5218)
Learn Wireshark - Fundamentals of Wireshark. by Lisa Bock(3953)
Linux Device Driver Development Cookbook by Rodolfo Giometti(3932)
Edit Like a Pro with iMovie by Regit(3400)
Linux Administration Best Practices by Scott Alan Miller(2857)
Linux Command Line and Shell Scripting Techniques by Vedran Dakic & Jasmin Redzepagic(2834)
MCSA Windows Server 2016 Study Guide: Exam 70-740 by William Panek(2520)
Mastering PowerShell Scripting - Fourth Edition by Chris Dent(2376)
Docker on Windows by Stoneman Elton(2317)
Kali Linux - An Ethical Hacker's Cookbook: End-to-end penetration testing solutions by Sharma Himanshu(2311)
Creative Projects for Rust Programmers by Carlo Milanesi(2224)
Hands-On AWS Penetration Testing with Kali Linux by Karl Gilbert(2107)
Hands-On Linux for Architects by Denis Salamanca(2051)
Programming in C (4th Edition) (Developer's Library) by Stephen G. Kochan(2002)
Computers For Seniors For Dummies by Nancy C. Muir(1995)
The Old New Thing by Raymond Chen(1939)
Linux Kernel Debugging by Kaiwan N Billimoria(1761)
