- Kubernetes Design Patterns and Extensions
- Onur Yilmaz
- 211字
- 2021-07-23 16:57:38
Activity: Running a Web Server with Synchronization
Scenario
You are assigned the task of making a Kubernetes installation for a web-based 2048 game. However, the game is still in development and developers push frequent changes throughout the day. In this installation, the game should be frequently
updated to include the recent changes.
Aim
With the successful deployment, there should be a pod running in Kubernetes with two containers. One of the containers should serve the game and the other container, namely the sidecar container, should continuously update the source code of the game. Using Kubernetes, you need to create a cloud-native solution where the server and synchronization tasks are working together, but not depending on each other.
Prerequisites
Use a git Docker image for continuous synchronization in the sidecar container and an open source code repository for the 2048 game.
Steps for Completion
- Create a pod definition.
- Include two containers:
- httpd for game serving.
- git for source code synchronization.
- Deploy the pod.
- Show the logs of the synchronization.
- Check whether the game has started.
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.
You are expected to create a 2048 game, like the one shown in the following screenshot:
- Introduction to DevOps with Kubernetes
- 傳感器技術(shù)實(shí)驗(yàn)教程
- 網(wǎng)頁編程技術(shù)
- 程序設(shè)計(jì)缺陷分析與實(shí)踐
- Hands-On Data Science with SQL Server 2017
- 網(wǎng)上生活必備
- 圖形圖像處理(Photoshop)
- 自動(dòng)檢測與傳感技術(shù)
- STM32G4入門與電機(jī)控制實(shí)戰(zhàn):基于X-CUBE-MCSDK的無刷直流電機(jī)與永磁同步電機(jī)控制實(shí)現(xiàn)
- PostgreSQL 10 Administration Cookbook
- 軟件工程及實(shí)踐
- Silverlight 2完美征程
- 基于ARM9的小型機(jī)器人制作
- 人工智能:智能人機(jī)交互
- Hands-On Deep Learning with Go