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
Introduction to DevOps with Kubernetes

You're reading from   Introduction to DevOps with Kubernetes Build scalable cloud-native applications using DevOps patterns created with Kubernetes

Arrow left icon
Product type Paperback
Published in May 2019
Publisher
ISBN-13 9781789808285
Length 374 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Süleyman Akbaş Süleyman Akbaş
Author Profile Icon Süleyman Akbaş
Süleyman Akbaş
Onur Yılmaz Onur Yılmaz
Author Profile Icon Onur Yılmaz
Onur Yılmaz
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Chapter 1: Introduction to DevOps 2. Chapter 2: Introduction to Microservices and Containers FREE CHAPTER 3. Chapter 3: Introduction to Kubernetes 4. Chapter 4: Creating a Kubernetes Cluster 5. Chapter 5: Deploy an Application to Kubernetes 6. Chapter 6: Configuration and Storage Management in Kubernetes 7. Chapter 7: Updating and Scaling an Application in Kubernetes 8. Chapter 8: Troubleshooting Applications in Kubernetes 9. Chapter 9: Monitoring Applications in Kubernetes Appendix

Chapter 2: Introduction to Microservices and Containers

Activity 2: Installing a WordPress Blog and Database Using Docker

Solution:

Perform the following steps to complete this activity:

  1. Create a folder named data. This folder will keep the stateful state of the database in the next steps:
    mkdir data
  2. Start a MySQL container using the official Docker image and the following specifications:

    Use the data folder from Step 1 as the database file. Publish port 3306 to the local system. Set the MYSQL_ROOT_PASSWORD environment variable as rootPassword. Set the MYSQL_DATABASE environment variable as database. Set the MYSQL_USER environment variable as user. Set the MYSQL_PASSWORD environment variable as password. Use mysql as the name of the container. Use the mysql:5.7 container image:

    docker run \
    -v ${PWD} /data/:/var/lib/mysql \
    -p 3306:3306 \
    -e MYSQL_ROOT_PASSWORD=rootPassword \
    -e MYSQL_DATABASE=database \
    -e MYSQL_USER=user \
    -e MYSQL_PASSWORD=password \
    --name mysql...
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