Skip to content

Step by Step to deploy a Container into Kubernetes, IBM Cloud

Notifications You must be signed in to change notification settings

imv7/ibmcloud-kubernetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 

Repository files navigation

ibmcloud-kubernetes

Step by Step to deploy a Container into Kubernetes, IBM Cloud

Summary

Welcome to IBM Registry Container

Let's get started by installing the needed CLIs, setting up your first private registry namespace, and pushing your first image.

Install, Set Up, and Log In

  1. Install the IBM Cloud CLI

  2. Install the Docker CLI.

  3. Install the Container Registry plug-in.

ibmcloud plugin install container-registry -r Bluemix

  1. Log in to your IBM Cloud account.

ibmcloud login -a https://cloud.ibm.com If you have a federated ID, use ibmcloud login --sso to log in to the IBM Cloud CLI.

  1. Choose a name for your first namespace, and create that namespace. Use this namespace for the rest of the Quick Start.

ibmcloud cr namespace-add gars

Push the image to your private registry

  1. Log your local Docker daemon into the IBM Cloud Container Registry.

ibmcloud cr login

  1. Pull the test image from Docker Hub.

docker pull us.icr.io/gars/commerce:lbcluster

  1. Choose a repository and tag by which you can identify the image. Use the same repository and tag for the rest of this Quick Start.

docker tag us.icr.io/gars/commerce:lbcluster us.icr.io/<namespace>/commerce:lbcluster

  1. Push the image.

docker push us.icr.io/<namespace>/commerce:lbcluster

  1. Verify that your image is in your private registry.

ibmcloud cr image-list

Welcome to IBM Cloud Kubernetes

Gain access to your cluster

Prerequisites Download and install a few CLI tools and the Kubernetes Service plug-in.

curl -sL https://ibm.biz/idt-installer | bash

  1. Log in to your IBM Cloud account.

ibmcloud login -a https://cloud.ibm.com --sso

  1. Target the Kubernetes Service region in which you want to work.

ibmcloud ks region-set us-south

  1. Get the command to set the environment variable and download the Kubernetes configuration files.

ibmcloud ks cluster-config gars_disaster_recovery

  1. Set the KUBECONFIG environment variable. Copy the output from the previous command and paste it in your terminal. The command output should look similar to the following.

export KUBECONFIG=/Users/igor/.bluemix/plugins/container-service/clusters/gars_disaster_recovery/kube-config-hou02-gars_disaster_recovery.yml

Alternatively, you can directly download your kubeconfig files to manually configure the cluster context.

  1. Verify that you can connect to your cluster by listing your worker nodes.

kubectl get nodes

  1. Deploy to a Kubernetes services

kubectl run <service_name> --image=us.icr.io/<namespace>/commerce:lbcluster

About

Step by Step to deploy a Container into Kubernetes, IBM Cloud

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published