Using Init Containers in Kubernetes

Get Started
30 minutes
  • 2 Learning Objectives

About this Hands-on Lab

Init containers are a great way to customize container startup. This lab will allow you to test your knowledge of init containers by using them to solve problems in an existing Kubernetes cluster.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create a Sample Pod That Uses an Init Container to Delay Startup

You will find a simple pod descriptor on the control plane server at /home/cloud_user/pod.yml. Modify this pod descriptor to add an init container that will delay startup if shipping-svc cannot be located using nslookup. Then, create the pod.

Test Your Setup by Creating the Service and Verifying the Pod Starts Up

Apply the deployment descriptor for the shipping-svc found at /home/cloud_user/shipping-svc.yml. Watch the status of your pod. If you set it up correctly, you should see the pod complete startup once the service becomes available.

Additional Resources

You are working for BeeBox, a company that provides regular shipments of bees to customers. The company is in the process of deploying a shipping status application to the cluster.

The developers are building an application component designed to run in a Kubernetes pod. This component depends on a Kubernetes service called shipping-svc, and they would like their application container to delay startup when this service is not available in the cluster. Once the service becomes available, the main application container should proceed with startup.

Your task is to build a proof-of-concept showing how a pod can be designed that will delay startup of application containers until the service becomes available.

What are Hands-on Labs

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.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


$2,495.00

Checkout
Sign In
Welcome Back!
Thanks for reaching out!

You’ll hear from us shortly. In the meantime, why not check out what our customers have to say about ACG?