- 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.
推薦閱讀
- 零起步輕松學單片機技術(shù)(第2版)
- Word 2000、Excel 2000、PowerPoint 2000上機指導(dǎo)與練習
- ABB工業(yè)機器人編程全集
- 構(gòu)建高質(zhì)量的C#代碼
- 網(wǎng)頁編程技術(shù)
- Hands-On Cloud Solutions with Azure
- Apache Hive Essentials
- 流處理器研究與設(shè)計
- Maya極速引擎:材質(zhì)篇
- AWS Administration Cookbook
- 自動控制理論(非自動化專業(yè))
- 基于32位ColdFire構(gòu)建嵌入式系統(tǒng)
- Visual FoxPro數(shù)據(jù)庫基礎(chǔ)及應(yīng)用
- Mastering ServiceNow Scripting
- 單片機C語言程序設(shè)計完全自學手冊