Kubernetes on IBM Cloud#
This guide shows how to deploy JupyterHub on the IBM Cloud using their Kubernetes service). It should provide you with enough knowledge to create a cluster, deploy your application using a Docker image and use a custom domain to use the deployed app.
Before you begin:
Understand the [Kubernetes basics][https://kubernetes.io/docs/tutorials/kubernetes-basics/].
Install the IBM Cloud Developer Tools
Install the IBM Cloud CLI.
curl -sL https://ibm.biz/idt-installer | bash
Verify your installation
ibmcloud dev help
Connect to the proper IBM API endpoint for your IBM Cloud location. Example:
ibmcloud api https://api.ng.bluemix.net
Log in to IBM Cloud using your IBMid
ibmcloud login. Use the
--ssooption to log in using your federated ID.
Set up your org and space
ibmcloud target --cf
To follow this guide, you can use a free cluster. You can also use a paid cluster of type standard on IBM Cloud.
Create a Kubernetes cluster Kubernetes Service delivers powerful tools by combining Docker and Kubernetes technologies, an intuitive user experience, and built-in security and isolation to automate the deployment, operation, scaling, and monitoring of containerized apps in a cluster of computing hosts.
To set up the Kubernetes cluster:
Create a Kubernetes cluster from the IBM Cloud catalog).
When configuring the new cluster, select the Cluster type and click Create Cluster to provision a Kubernetes cluster. 2.1 In the case of a free cluster you will see something similar to:
2.2 In the case of a paid cluster you will see something similar to:
Check the status of your Cluster and Worker Nodes and wait for them to be ready.
Or, if you prefer, create the cluster using the IBM Cloud CLI tools)
Configure kubectl kubectl is a CLI tool to interact with a Kubernetes cluster. In this occasion, you will use it to point forward to the created Kubernetes cluster.
ibmcloud loginto log in interactively into the IBM Cloud. Provide the organization (org), location and space under which the cluster is created. You can reconfirm the details by running
When the cluster is ready, retrieve the cluster configuration by using the cluster’s name:
ibmcloud cs cluster-config <clusterName>
Copy and paste the export command to set the KUBECONFIG environment variable as directed. The command should be something similar to:
To verify whether the KUBECONFIG environment variable is set correctly or not, run the following command:
Check that the
kubectlcommand is correctly configured
Hooray! You have your Kubernetes cluster running; it’s time to begin Setting up helm.
More info and readings: