The Cloud Native Application Management series is an introduction to how to build, test, deploy, and manage applications using cloud native technologies. The original purpose of this series is to promote best practices in cloud native application management and to spread open source standards and knowledge. Through this series, I hope to help you learn new knowledge about Kubernetes, Helm, Gitops, Kustomize, etc.

It was an ordinary morning for Xiao Zhang, a programmer in dachang. Everyone seemed to be discussing something:

“What? I heard the company next door is using K8s to launch apps?”

‘They say Helm is in use!

As usual, Xiao Zhang didn’t care about these boring discussions. He sits firmly in front of the desk, opens the project management system developed by the company and modified by Gitlab, clicks several buttons, and begins to work hard all day.

But this time, for some reason, Zhang felt a little nervous: “Helm? What is a Helm?”

—— split line ——

Helm: K8s application deployment and packaging tool

What is the quickest way for a user to deploy a K8s application?

As we know, Kubernetes (K8S for short) is a platform for deploying and managing containers. However, the concept of “application” is not yet abstracted in K8S. An application usually consists of multiple K8S resources (Deployment, Service, ConfigMap). Therefore, we need a tool to deploy and manage the resources contained in an application (K8S API Resource) on top of K8S, which is what Helm does.

In addition, Helm defines a Chart format to describe an application. How do I understand Chart? For example, an Android program packaged as APK can be installed on any Android phone. If we compare K8S to Android system and K8S application to Android program, then Chart can compare APK. This also means that K8s applications can be deployed to any K8s cluster by Helm as long as they are packaged as Chart.

Generally speaking, we can use Helm Chart that someone else has already done, just like Docker image. As a result, the Helm community has maintained an official Helm Hub, which contains a wealth of applications and is currently the main site for cloud native developers to search and download applications.

AppHub: Helm Hub’s Chinese outpost

Unfortunately, using Helm Hub at home is a pain in the neck for most developers.

The reason is simple, open any Charts file and you’ll see that it’s full of unaccessible mirror urls:





Or rely on a Charts library that is completely inaccessible:



We software engineers have so little time that we don’t want to spend our time solving these boring network problems.

However, it is still a bit sour to see foreign programmers deploying applications with a single helm install command.

So before we start exploring Cloud Native App management, we want to introduce you to a service called The Open Cloud Native AppHub (AppHub), which is available at developer.aliyun.com/hub.

AppHub is a public welfare Helm Hub “China station” hosted on domestic public cloud. Its backend was developed by three engineers from Ali Cloud host platform team in 20% of the time.

One of the important responsibilities of this site is to automatically synchronize all Helm official Hub hosted applications to the country; Meanwhile, all urls with network access problems such as Gcr. IO in the Charts file are automatically replaced with stable domestic mirror urls.

In this way, domestic developers can also use Helm Install to install applications freely!

Next, let’s get into our favorite practice!

Example: Deploy Guestbook as quickly as possible

The first, of course, is the installation of Helm.

We strongly recommend that you use Helm V3.

Helm V3 is as different from Helm V2 as Python 2 and 3, and much easier to use than Helm V2 (e.g., no Tiller installed on the server). We will explain this next week in Why You Must Move to Helm V3 as soon as possible.

For the convenience of Chinese developers, we have automatically synchronized the download link of Helm V3 binaries to China (do try it, it is really in seconds) :

  • MacOS amd64 tar.gz
  • MacOS amd64 zip
  • Linux 386
  • Linux amd64
  • Linux arm64
  • Windows amd64

Download the Helm binary and unzip it directly to $PATH.

Next, we used Helm to quickly deploy a GuestBook application. This assumes that you have an Aliyun Kubernetes service running (if not, it doesn’t matter, here is an example of a self-built K8s cluster).

The first step is to add Apphub as your Helm Hub Repo:

$ helm repo add apphub https://apphub.aliyuncs.comCopy the code


To search for GuestBook, run the following command:

$ helm search guestbook
NAME                       CHART VERSION   APP VERSION DESCRIPTION
apphub/guestbook           0.2.0           1.0.0       A Helm chart to deploy Guestbook three tier web...Copy the code


Then, with a single command:

$ helm install guestbook apphub/guestbookCopy the code


Access the Guestbook service

Once deployed, run the following command to query and wait for pods to start (Running):

$ kubectl get pod
NAME                                   READY   STATUS    RESTARTS   AGE
guestbook-d85895895-5mdx6   1/1     Running   0          5m59s
guestbook-d85895895-zh4l4   1/1     Running   0          5m59s
redis-master-7b5cc58fc8-2wjmn          1/1     Running   0          5m59s
redis-slave-859585ff7f-4v9hj           1/1     Running   0          5m59s
redis-slave-859585ff7f-fppqn           1/1     Running   0          5m59sCopy the code


Enquiry service address:

$kubectl get service -lApp.kubernetes. IO /name= GuestBook name TYPE cluster-ip external-ip PORT(S) AGE GuestBook LoadBalancer 172.21.1.213 47.95.136.189 3000:32244 / TCP 11 mCopy the code


You can access the GuestBook service using the External IP address:




Use Minikube or build your own K8s cluster?

In fact, K8s itself does not distinguish between services on the cloud and self-built clusters. However, in the absence of cloud-provided load balancing services, Service access is slightly more cumbersome, such as using NodePort:

$ helm install guestbook apphub/guestbook --set service.type=NodePortCopy the code


After this command is executed, the application will automatically prompt you for the next access method. How to set application parameters using –set will be discussed in a later article.

If the NodePort Service is Minikube, you need to map the NodePort Service from Minikube:

$ minikube service guestbookCopy the code


Try “One-click Installation” (Experience function)

In addition to normal deployment methods, AppHub can also experience one-click deployment of Chart to k8S in any cloud through web UI.

For example, simply open the GuestBook Application details page and click Install with one click:



Then fill in the corresponding server URL and Base64-encoded certificate data in the “Installation Parameters” pop-up window, and click “Ok”. AppHub will try to install GuestBook Chart on the corresponding K8S cluster, and a pop-up message will be displayed after the installation is successful.

However, this feature is just an “experiment” for now, as there is no way to change the app’s configuration parameters directly on AppHub. Online “app customization” is in AppHub’s Roadmap and is expected to come online next month.

But speaking of Roadmap:


AppHub will open source on Github within 6 months!

Yes, you can always contribute your ideas to the Helm Hub China site via Github. For example: how to do “application customization” better? How to dock and host your own Charts Repo? And so on.

Our slogan is: Every Chinese developer is our PM! (Serious face)

Far more than Helm!

As you can see, the process of rapidly deploying K8s applications through Helm is very low in terms of threshold and mental burden. Helm + K8s’ automated combination is fast becoming the most efficient developer in the cloud era compared to the traditional process of building, choreographing and publishing applications.

All of the app Charts that are synchronized from the official Hub Repo are hosted on Github: CloudnativeApp/Charts. Anyone who has any fun about AppHub is welcome to make an issue of this Repo. Also feel free to add your Charts and Repo to AppHub by submitting pull requests.

But if you’ve been using Helm in depth for a while, you might have some other feelings:

For example: “What exactly does the concept of Release in Helm mean? What about Helm’s Rollback and K8s?”

“Helm’s K8s application management process is not so Native, there is something wrong.”

In the next few articles, we will analyze the advantages and disadvantages of Helm system in depth, comb out the best practices of using Helm in K8s architecture, share and explain the Kustomize process and GitOps architecture, and more examples of cloud native application management.

Stay tuned!

Author Introduction: Deng Hongchao, aliyun engineer, former CoreOS software engineer, one of the initial authors of Kubernetes Operator mechanism, the second Operator (because the first one is Li Xiang), has more research and experience in K8s application management system.


The original link

This article is the original content of the cloud habitat community, shall not be reproduced without permission.