Unit 9 - IBM Cloud Kubernetes Service Overview
Unit 9 - IBM Cloud Kubernetes Service Overview
overview
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
IBM Cloud Kubernetes Service
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Topics
• IBM Cloud Kubernetes Service
• Deploying an application
• Summary and further reading
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
IBM Cloud Kubernetes Service
A certified, managed Kubernetes service that provides an intuitive user
experience with on-going cluster management. It has built-in security and
isolation to enable rapid delivery of apps while using IBM Cloud Services.
Features:
• Secure.
• Automated lifecycle management.
• Fully integrated with IBM Cloud and third-party services.
• Fully integrated with cognitive solutions with various Watson APIs.
• Different worker node types.
• Supports community-certified Kubernetes and Red Hat OpenShift
(RHOS) Kubernetes.
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
IBM Cloud Kubernetes Service demonstration
Access the IBM Service catalog and select Kubernetes
Service.
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Creating a free cluster
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Instructor demonstration
If you choose to use a standard cluster, you can select the
Kubernetes version and flavors of compute resources.
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Accessing your cluster
Wait for your cluster to provision, and then access it by using the
kubectl command.
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Scaling out
The cluster can scale out by adding more worker nodes.
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Kubernetes Dashboard
You can also access the Web UI (Dashboard).
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Exercise 5: Part 1
• For exercise 5, you must create a new Kubernetes cluster by clicking
Free Cluster and then clicking Create Cluster on the IBM Cloud
console.
▪ It takes 30 minutes to provision the cluster.
• Perform Exercise 5, Part 1. Creating an IBM Cloud Kubernetes Service
cluster now.
• Notify the instructor after you click Create Cluster to proceed.
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Planning your cluster for high availability
IBM Cloud Kubernetes Service can also deploy across multiple availability
zones.
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Accessing IBM Cloud Kubernetes Service by using kubectl
Access the Kubernetes cluster by using the kubectl command.
# 1. Log in to your IBM Cloud account:
ibmcloud login -a https://cloud.ibm.com
# 2. Target the IBM Cloud Kubernetes Service region:
ibmcloud ks region-set uk-south
# 3. Get the command to set the environment variables and download
the Kubernetes configuration files:
ibmcloud ks cluster-config ikscluster
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
IBM Cloud Container Registry
• Multi-tenant private image registry with an integrated Vulnerability
Advisor.
• Check images for known vulnerabilities and create deployment rules to
prevent using vulnerable images.
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Vulnerability Advisor
• Detailed view of detected vulnerabilities.
• Vulnerability Advisor provides security management for IBM Cloud
Container Registry and provides functions to help you secure your
images.
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Using the Private Image Registry
Command-line usage
# List images
ibmcloud cr login
ibmcloud cr image-list
# Creating a namespace
ibmcloud cr namespace-list
ibmcloud cr namespace-add <my_namespace>
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Deploying an application
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Topics
• IBM Cloud Kubernetes Service
• Deploying an application
• Summary and further reading
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Deploying an application on IBM Cloud Kubernetes Service
You can deploy an application according to the steps that are
shown in this slide. The circled numbers are matched with each
step of the next slide.
3 4
1 2
Build a container
Crete a Node.js
image.
Application.
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Deploy an application on IBM Cloud Kubernetes Service
You deploy an application in exercise 6 by completing the following
steps:
1. Connect to your cluster by using the CLI.
2. Create a Node.js sample application.
o IBM Cloud App Service starter kits provide a pre-configured sample
application.
3. Build a container image.
o You build your images directly on the IBM Cloud Container Registry
service.
4. Check the security status of container images.
o IBM Cloud Container Registry provides the Vulnerability Advisor service.
5. Deploy an application to IBM Cloud Kubernetes Service.
o You can directly manipulate deployment through YAML.
6. Scale out an application.
o You can scale an application manually or set up the autoscale function.
7. Expose the app over the internet.
o You expose the service by using NodePort.
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Summary and further reading
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Topics
• IBM Cloud Kubernetes Service
• Deploying an application
• Summary and further reading
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Further reading
• https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/
• https://www.ibm.com/cloud/garage/content/course/kubernetes-101
• https://cognitiveclass.ai
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Unit summary
• Create a Kubernetes cluster by using the IBM Cloud Kubernetes
Service.
• Create containers and build on the IBM Cloud Container Registry.
• Work with helm charts.
• Deploy an application to IBM Kubernetes Service.
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Exercise 5: Managing IBM
Cloud Kubernetes Service
clusters
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Exercise objectives
• This exercise demonstrates how to create an IBM Kubernetes
Service cluster and manage it by using the kubectl CLI.
• After completing this exercise, you should be able to:
▪ Create an IBM Cloud Kubernetes Service cluster.
▪ Connect to a cluster on IBM Cloud Kubernetes Service.
▪ List the worker nodes in a cluster.
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Exercise 6: Deploying an
application on Kubernetes
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019
Exercise objectives
• In this exercise, you build a containerized application and
deploy it to IBM Cloud Kubernetes Service.
• After completing this exercise, you should be able to:
▪ Create a containerized Node.js application and build it on IBM
Cloud Container Registry.
▪ Explain how the container security analysis capability of
Vulnerability Advisor can identify the security vulnerabilities by
scanning an image.
▪ Create a deployment and scale it.
▪ Expose your application on the internet.
IBM Cloud Kubernetes Service overview © Copyright IBM Corporation 2016, 2019