- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud
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.
Lab Info
Table of Contents
-
Challenge
Update the Service to Use the New Port
There is a Service called
hive-svclocated in thedefaultNamespace. Modify this service so that it listens on port9076. -
Challenge
Add an init Container to Delay Startup
The app is managed by the
app-gatewayDeployment located in thedefaultNamespace. Add an init container to the Pod template so that startup will be delayed by10seconds. You can do this by using thebusybox:stableimage and running the commandsh -c sleep 10. -
Challenge
Add an Ambassador Container to Make the App Use the New Service Port
Find the
app-gatewayDeployment located in thedefaultNamespace. Add an ambassador container to the Deployment's Pod template using thehaproxy:2.4image.Supply the ambassador container with an
haproxyconfiguration file at/usr/local/etc/haproxy/haproxy.cfg. There is already a ConfigMap calledhaproxy-configin thedefaultNamespace with a pre-configuredhaproxy.cfgfile.You will need to edit the
commandof the main container so that it points tolocalhostinstead ofhive-svc.
About the author
Real skill practice before real-world application
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.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.