Kubernetes
This page describes how to deploy PM415 on Google Cloud using Kubernetes
This PM415 Kubernetes deployment is for demos only - there is no persistence and data loss will occur. For a production deploy you must change the MySQL and Elastic Search Deployment files to include persistent storage, increase the cluster sizes, and enable node-to-node communication in Elastic Search.
Install and configure docker + gcloud
Follow the instructions to install docker and gcloud.
Add Google Container Registry to your docker config:
Login to your Google account:
Build and push container image to GCR
Download the PM415 git repository and change directories
Build a docker image, tag it, and push to Google Container Registry (GCR). Replace the tag with your own Google Cloud Project name according to the format documented here.
Create a Kubernetes cluster
Login to Google Cloud and navigate to Kubernetes Engine
Choose Create cluster
Choose Standard cluster and accept all the defaults
Click Create
Create a kubectl config
Install kubectl using these instructions
Return to the Kubernetes Engine page in the Google Cloud Console and click edit icon.
When the edit screen appears - write down the Endpoint IP address.
Click Show credentials and copy the certificate to your clipboard In a terminal
Convert the certificate to base64 - the following works on a mac:
pbpaste | base64
Return to the cluster credential window and copy the admin password
Create a file named config.yml
with the following contents:
Test your config
Create the KUBECONFIG environment variable to reference your config:
Test your config
This should return the list of Kubernetes nodes in your Google Cloud account.
Create Kubernetes secrets
PM415 deployments have a few different secrets to reference.
Create pods
Edit the file pm415.yaml
and replace the following values with your information. If you do not change the DOMAIN_URL to a valid domain - the installation will fail CORS security rules.
Create pods from the PM415 directory
Check the status of your pods
Check all of your pods to see if any are failing. If you see evictions, you might be running out of resources.
Use the describe command to see specific error messages for a pod
Expose pods as services
This will expose two internal ip's for MySQL and ElasticSearch, and a Load Balancer for PM415.
Get IP address and configure DNS
Wait a few minutes and then run this command to get the PM415 load balancer IP address:
This will return information like the following:
Use this IP address for your DNS A record. Make sure this is the same value as the DOMAIN_URL you set in the pm415.yml
deployment configuration.
Last updated