Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Kubernetes Design Patterns and Extensions

You're reading from   Kubernetes Design Patterns and Extensions Enhance your container-cluster management skills and efficiently develop and deploy applications

Arrow left icon
Product type Paperback
Published in Sep 2018
Publisher Packt
ISBN-13 9781789619270
Length 106 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Onur Yılmaz Onur Yılmaz
Author Profile Icon Onur Yılmaz
Onur Yılmaz
Arrow right icon
View More author details
Toc

Chapter 1: Kubernetes Design Patterns

Following are the activity solutions for this chapter.

Activity: Running a Web Server with Synchronization

In the sidecar.yaml file, pod definition with two containers, namely server and sync, is provided. In the server container, httpd serves the source volume on port 80. In the sync container, git runs with every 30 seconds to synchronize the source volume. These two containers work independently; however, they are sharing the source volume to achieve file synchronization:

apiVersion: v1
kind: Pod
metadata:
name: sidecar
spec:
containers:
...
volumes:
- emptyDir: {}
name: source

Follow these steps to get the solution:

  1. Create the pod with the following command:
 kubectl apply...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime