Book Image

Containers in OpenStack

Book Image

Containers in OpenStack

Overview of this book

Containers are one of the most talked about technologies of recent times. They have become increasingly popular as they are changing the way we develop, deploy, and run software applications. OpenStack gets tremendous traction as it is used by many organizations across the globe and as containers gain in popularity and become complex, it’s necessary for OpenStack to provide various infrastructure resources for containers, such as compute, network, and storage. Containers in OpenStack answers the question, how can OpenStack keep ahead of the increasing challenges of container technology? You will start by getting familiar with container and OpenStack basics, so that you understand how the container ecosystem and OpenStack work together. To understand networking, managing application services and deployment tools, the book has dedicated chapters for different OpenStack projects: Magnum, Zun, Kuryr, Murano, and Kolla. Towards the end, you will be introduced to some best practices to secure your containers and COE on OpenStack, with an overview of using each OpenStack projects for different use cases.
Table of Contents (17 chapters)
Title Page
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface

Kubernetes hands-on


We learned how to install the Kubernetes cluster in the previous section. Now, let's create a more complex example with Kubernetes. In this application, we will deploy an application running a WordPress site and MySQL database using official Docker images.

  1. Create a persistent volume. Both WordPress and MySQL will use this volume to store data. We will create two local persistent volumes of size 5 GB each. Copy the following content to the volumes.yaml file:
apiVersion: v1kind: PersistentVolumemetadata:  name: pv-1  labels:    type: localspec:  capacity:    storage: 5Gi  accessModes:    - ReadWriteOnce  hostPath:    path: /tmp/data/pv-1  storageClassName: slow ---apiVersion: v1kind: PersistentVolumemetadata:  name: pv-2  labels:    type: localspec:  capacity:    storage: 5Gi  accessModes:    - ReadWriteOnce  hostPath:    path: /tmp/data/pv-2  storageClassName: slow 
  1. Now, create the volume by running the following command:
        $ kubectl create -f volumes.yaml         persistentvolume...