How to Create a Cluster for Container Service with Kubernetes

In this tutorial, we will show you how to create a cluster on which you can install Alibaba Cloud’s Container Service for Kubernetes. Alibaba Cloud’s Container Service for Kubernetes is made up of a Virtual Private Cloud (VPC) which contains clusters of Alibaba Cloud Elastic Compute Service (ECS) instances.

Before you can run Kubernetes containerized application environments on Alibaba Cloud’s Container Service for Kubernetes you need to create a Kubernetes cluster.

Orchestrating containerized applications with virtual management tools, such as Kubernetes and Docker Swarm, allows developers to manage and monitor production and development environments made up of containerized applications built directly into the Alibaba Cloud Container Service.

What Is Alibaba Cloud’s Container Service?

Alibaba Cloud’s Container Service is a scalable and reliable high-performance container management service that allows you to orchestrate and manage containerized application lifecycles with either Kubernetes or Docker Swarm.

Alibaba Cloud’s Container Service offers multiple application release methods, including continuous integration, and also supports a microservices architecture. Container Service for Kubernetes provides enterprise level performance and flexibility for the management of Kubernetes containerized applications at every stage of the development lifecycle.

Alibaba Cloud’s Container Service for Kubernetes simplifies cluster creation, management, and allows easy upscale. It also auto-integrates with Alibaba Cloud’s virtualization, storage, network, and security services which improve and simplify the overall running environment for Kubernetes containerized applications.

Alibaba Cloud’s Container Service is one of the first cloud container services to have passed the Certified Kubernetes Conformance Program.

What Is Kubernetes (k8s)?

Kubernetes is a large scale, open source, automated orchestration platform for multi-container applications. It eliminates the manual work involved in deploying and scaling containerized applications. Kubernetes orchestrates, manages, and monitors extensive, enterprise-grade clusters of nodes that together run containerized application stacks.

Kubernetes organizes containers into logical units for easy administration. It deals with the computing, networking, and storage infrastructure required by user workloads and is highly flexible and scalable. Kubernetes functions as both Platform as a Service (PaaS) and Infrastructure as a Service (IaaS) and is flexible, simple to use, and portable.

Kubernetes mainly orchestrates applications built up of Docker containers, but it can also manage any container system that conforms to the Open Container Initiative (OCI) standards for container image formats and runtimes.

Why Do I Need to Create a Cluster?

Before we can install and run Kubernetes container stacks with Alibaba Cloud’s Container Service, we need to have an Alibaba Cloud Container Service Kubernetes cluster ready and available for implementing our containerized systems. The Kubernetes cluster has three master nodes which orchestrate and maintain the application stacks by scheduling the containers on the worker nodes in the cluster.

This tutorial describes the preliminary step of building out a Kubernetes cluster. In a previous tutorial, we showed you how to implement Docker images on the Docker Swarm cluster with Alibaba Cloud’s Container Service.

Prerequisites

You will need an Alibaba Cloud account. If you don’t already have one, head over to the Free Trial page to get $300–1200 worth of Alibaba Cloud products to try out with in the Alibaba Cloud Free Trial.

Before setting up the Kubernetes cluster, make sure you have activated Alibaba Cloud’s Container Service, the Resource Orchestration Service (ROS), Resource Access Management (RAM), and Elastic Scaling Service (ESS) service.

Let’s get started.

Creating a Kubernetes Cluster

First, head over to the Products page and click Container Service.

Image for post
Image for post

You will arrive at the Container Service console page.

Make sure the Container Service — Kubernetes option is selected before clicking Create Kubernetes Cluster.

Image for post
Image for post

In the Kubernetes tab, give your Cluster a unique name and pick your Region and Zone.

Image for post
Image for post

You can Auto Create a VPC for the cluster or use an already existing VPC with Use Existing. We’ll pick Auto Create.

Image for post
Image for post

Now set the Master and Worker node configuration. Master nodes default to a three node allowance. We will create just one Worker node for the cluster but in practice you will usually have many more Worker nodes than Masters.

If you have connected up a pre-existing VPC you can add pre-created ECS instances to the Worker nodes here.

Image for post
Image for post

Set a key-pair or a password for security purposes and pick the Kubernetes version you require.

Image for post
Image for post

Select the required services. For auto-created VPCs, you must select SNAT.

If you wish to expose the API service to the public network, you must select Public SLB.

You can enable SSH if you wish.

We have chosen to install the monitoring, logging, and network plugins.

Image for post
Image for post

The advanced configuration details allow you to set a maximum number of pods per node and decide whether to install a CA certificate.

Image for post
Image for post

When you’re ready, click Create in the upper right-hand corner of the screen.

Image for post
Image for post

If there are any required services or roles not activated, you will be warned. Go ahead and activate them.

Image for post
Image for post

When you’re ready, click Create again. You will see confirmation of your cluster set up and the associated costs and billing methods.

Image for post
Image for post

When you’re happy with the details, click OK.

Image for post
Image for post

You will see a screen detailing the cluster creation process.

Image for post
Image for post

This process may take a while. Please be patient.

Once everything is created, you will see the components marked in green and a message saying the cluster has been successfully created.

Click Clusters.

Image for post
Image for post

You will see the cluster running.

Click the cluster name.

Image for post
Image for post

You can see Basic Information on the cluster.

Image for post
Image for post

On the Node List page, you will find details for the cluster nodes including status, roles, CPU usage details for each node, memory usage, update time and a click through to view the Alibaba Cloud CloudMonitor page for each ECS instance.

Image for post
Image for post

You can see details of all events on the cluster on the Event List page.

Image for post
Image for post

You can also click through to Cluster Audit where you will see information on events, visitor details, server loads, etc.

This page will be more useful when the container stacks are running.

Image for post
Image for post

You are now ready to build your Kubernetes containerized application environments with Alibaba Cloud’s Container Service.

Summary

First, we told you how, along with Docker Swarm applications, you can build Kubernetes containerized applications with Alibaba Cloud’s Container Service for Kubernetes.

We informed you that, before you can go ahead and build out your Kubernetes application environments, you must have a Container Service cluster ready for Kubernetes to run on.

We gave you some information about Alibaba Cloud’s Container Service, specifically the Container Service Kubernetes product which manages large-scale containerized applications. We told you about Kubernetes and then we took you through the step-by-step process of setting up a Container Service Kubernetes cluster on Alibaba Cloud.

You are now ready to build out your Kubernetes environments and we will show you exactly how to do that in a future tutorial.

See you soon.

Reference:https://www.alibabacloud.com/blog/how-to-create-a-cluster-for-container-service-with-kubernetes_594513?spm=a2c65.12602382.0.0

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store