- Lab
- A Cloud Guru
Using Multiple Containers in a Kubernetes Pod
Multi-container Pods in Kubernetes use additional containers within the same Pod to solve technical challenges. This lab will allow you to get hands-on with multi-container Pods. You will build expertise as you design your own multi-container Pod in order to address a real-world issue.
Path Info
Table of Contents
-
Challenge
Update the Service to Use the New Port
There is a Service called
hive-svc
located in thedefault
Namespace. Modify this service so that it listens on port9076
. -
Challenge
Add an init Container to Delay Startup
The app is managed by the
app-gateway
Deployment located in thedefault
Namespace. Add an init container to the Pod template so that startup will be delayed by10
seconds. You can do this by using thebusybox:stable
image and running the commandsh -c sleep 10
. -
Challenge
Add an Ambassador Container to Make the App Use the New Service Port
Find the
app-gateway
Deployment located in thedefault
Namespace. Add an ambassador container to the Deployment's Pod template using thehaproxy:2.4
image.Supply the ambassador container with an
haproxy
configuration file at/usr/local/etc/haproxy/haproxy.cfg
. There is already a ConfigMap calledhaproxy-config
in thedefault
Namespace with a pre-configuredhaproxy.cfg
file.You will need to edit the
command
of the main container so that it points tolocalhost
instead ofhive-svc
.
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.