-
Create a paid IBM Cloud account, and log into the dashboard.
-
Choose Containers from the left hand hamburger navigation.
-
Click the Create cluster button.
-
Select the Standard pay-as-you-go type of cluster (this allows for storage volumes and public floating IPs) and Create.
-
Going back to the Dashboard from the navigation, you'll see your cluster.
-
Click on it to see the cluster Overview.
-
Click on Worker Nodes to get details on your worker nodes.
-
It will take time for the cluster to complete provisioning, so go get some coffee.
-
Click on the Access link to download and configure the
bx
andkubectl
CLIs.kubectl
version >=1.7.6 is required. -
Run the configuration commands, making sure that the
$KUBECONFIG
variable path is indeed correct (it may not reflect your actual home directory). -
You can then use
kubectl
or thekubectl proxy
dashboard web UI that starts on localhost to inspect your Kubernetes environment.
-
You can do this with the
bx
command too, but I prefer to work with the dashboard as it's just a one time setup operation with several options to browse through. -
Go to the hamburger navigation again and choose Data & Analytics.
-
Click "Create"
-
You have a choice of two MySQL-as-a-Service providers, Compose and ClearDB. ClearDB is quicker to get running with for a PoC. You can use the free plan, but if you need better performance, choose a paid plan.
-
Take note of the credentials, and save them in a
scripts/kubernetes/secrets/service-credentials.txt
file you copy fromscripts/kubernetes/secrets/service-credentials.txt.tpl
. There are variables for both a "Staging" database instance and a "Production" instance. They will be separate databases with separate credentials.
For ClearDB, the credentials can be found in the ClearDB Dashboard. Select your database and click the "System Information" tab
For Compose, the credentials will be shown right before you create the service.
-
The IBM Cloud Container Service offers a way to autobind credentials, but using a secret from this credentials file gives us the option to use services in another organization and space and/or start it up later as its own pod.
-
Repeat these steps to create a second database and make sure you have entries for both in the
scripts/kubernetes/secrets/service-credentials.txt
file.
-
You can do this with the
bx
command too, but I prefer to work with the dashboard as it's a one time setup operation with several options. -
Go to the hamburger navigation again and choose Data & Analytics.
-
Click "Create"
-
You have a choice of two Redis-as-a-Service providers, Compose and Redis Cloud. Redis Cloud has a free tier, so you can just use that.
-
Take note of the credentials, and save them in
scripts/kubernetes/secrets/service-credentials.txt
. -
For Compose, the credentials can be found by selecting the service from the dasboard, and clicking "Service Credentials"
-
You can do this with the
bx
command too, but I prefer to work with the dashboard as it's a one time setup operation with several options. -
Go to the hamburger navigation again and choose Data & Analytics.
-
Click "Create"
-
Choose Memcached from Redis Cloud.
-
Take note of the credentials, and save them in
scripts/kubernetes/secrets/service-credentials.txt
.