- Kubernetes Design Patterns and Extensions
- Onur Yilmaz
- 215字
- 2021-07-23 16:57:38
Activity: Running a Web Server after Content Preparation
Scenario
You are assigned the task of making a Kubernetes installation for a web server. However, there are some manual tasks to be carried out to change the files before serving them. You need to ensure that changes are always applied before the content is served. Besides this, show the status of the initialization and check the final output of the web server.
Aim
With the successful deployment, there should be a pod running in Kubernetes with one main container and one initialization container. In the initialization container, write Welcome from Packt to the main index file. This file should be served by the main container when started.
Prerequisites
- Use a basic Docker image for the initialization container, such as busybox.
- For the main container, a web server capable image should be used, such as nginx.
Steps for Completion
- Create a pod definition.
- Include one initialization container:
- Change the content of the files.
- Include one main container:
- Create a web server.
- Deploy the pod.
- Check the status of the initialization container.
- Check the output of the web server.
You should see the following output:
All of the code files for the activities in this chapter are provided on GitHub in the Lesson-1 folder at https://goo.gl/gM8W3p.
推薦閱讀
- Mastering Mesos
- 21天學通PHP
- 人工免疫算法改進及其應用
- Practical Data Wrangling
- 機器學習與大數(shù)據(jù)技術
- ROS機器人編程與SLAM算法解析指南
- 中國戰(zhàn)略性新興產業(yè)研究與發(fā)展:智能制造
- CompTIA Linux+ Certification Guide
- 聊天機器人:入門、進階與實戰(zhàn)
- 從零開始學C++
- Microsoft System Center Confi guration Manager
- 計算機組網(wǎng)技術
- 人工智能:語言智能處理
- Visual Studio 2010 (C#) Windows數(shù)據(jù)庫項目開發(fā)
- 和機器人一起進化