By Rainbond
Kubernetes abstracts everything within its boundaries as resources. The main resources are the workload controllers (such as Deployment and StatefulSet). Other types of resources work around these main resources. A workload-centric model for IT technicians can be implemented by combining these resources. All resources in Kubernetes are edited and described using declarative configuration files. YAML field definitions give IT technicians the greatest freedom but place high demands on their skills.
If your team has been using native Kubernetes for some time, you'll probably find that not every IT technician is good at writing complex Kubernetes declarative configuration files - YAML files. Learning and writing YAML will be a burden for developers whose main responsibility is business development, and they may even resist using it.
Rainbond, an open-source project, is a cloud-native application management platform that uses an application-centric design pattern. Based on this design pattern, Rainbond abstracts application models at a higher level than workload. You can manage the entire lifecycle of business applications without learning and writing YAML. The application corresponds to a complete business system, which consists of several service components that can be separately managed. You can deploy a business component by editing the service call relationship by dragging, pulling, and dropping operations from the source code and container images. For each service component, you can use some common O&M features based on the graphical user interface. On this basis, users can also use the core concept of the application model to make more advanced operations (such as publishing the entire business system in the form of an application template), based on which the business system can be deployed/upgraded with one click. This capability is useful in the area of software delivery. It allows for rapid delivery and personalized delivery based on the application template, regardless of whether the final delivery environment is online or offline.
The application model provided by Rainbond enables developers to focus on the application and the business, so it is accepted easier. The O&M features retained after tailoring are displayed and interactive through the graphical user interface, which significantly reduces the difficulty of use. Most developers can use Kubernetes smoothly through application templates without editing complex declarative configuration files.
The entire conversion process includes three steps:
Advanced workload attributes that can be managed and converted include:
Attribute Name | Description |
nodeSelector | It is used when you specify a type of node for scheduling. |
labels | It is used when you customize labels of service components to be used by node selectors. |
volumes | It is used to define mounts of volume type that are not managed by Rainbond. |
volumeMounts | It works with volumes to mount volumes to containers. |
affinity | It is a more advanced scheduling method, including node affinity and pod affinity. |
tolerations | It works with node taints. Only pods with the specified tolerations can be scheduled to the specified node. |
serviceAccountName | It is used to specify an existing SA for the service component so that the corresponding pod has certain permissions. |
privileged | Don't enable it if it's not necessary. |
env | It is used to define environment variables that are not managed by Rainbond, and it supports reference operations. |
It is worth noting that the extended RAM model can still be published as an application template for subsequent installation, upgrade, and delivery of the entire business system with one click.
The following test is based on Rainbond V5.8. I plan to use WordPress
, a website building system that has been deployed in the wp
namespace, to perform an import test (and test the import of existing Kubernetes applications). The system consists of the following resources:
[root@localhost ~]# kubectl get secret,service,deployment,statefulset,pod -n wp
NAME TYPE DATA AGE
secret/default-token-nq5rs kubernetes.io/service-account-token 3 27m
secret/mysql-secret Opaque 2 27m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/wordpress NodePort 10.43.157.40 <none> 8080:30001/TCP 5m19s
service/wp-mysql ClusterIP 10.43.132.223 <none> 3306/TCP 27m
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/wordpress 1/1 1 1 5m19s
NAME READY AGE
statefulset.apps/wp-mysql 1/1 27m
NAME READY STATUS RESTARTS AGE
pod/wordpress-66bc999449-qv97v 1/1 Running 0 5m19s
pod/wp-mysql-0 1/1 Running 0 27m
Visit Rainbond and choose Import from the Cluster drop-down list. On the page that appears, you can select the namespace wp
to which you want to import resources. The platform will group resources by label:
Rainbond divides applications based on the defined labels
on resources. For example, resources with the label app.kubernetes.io/name:wp-mysql
or app:wordpress
are distributed to two different applications in the figure, while resources without the above labels
are uniformly distributed into an ungrouped application. Dividing applications is critical because the advanced application of the application model is for an application as a whole, so it is important to plan carefully and add reasonable labels
before importing.
During importing, Rainbond submits different attributes to the extended model for management. Most O&M features have become easy to use, while others are managed by the Kubernetes attributes page.
Once the import is complete, both wordpress
and wp-mysql
can be managed on Rainbond.
Before being imported, WordPress
is exposed based on the NodePort Service
, but after being imported to Rainbond for management, it uses a gateway to expose port 80 to the outside world. Note: You must restart the WordPress
service component for the access policy to take effect.
For some services, the access portal does not support dynamic designation, which requires the service side to make some changes to adapt to the new access portal. For WordPress
, the site address in the general options needs to be redefined.
The WordPress
system I deployed uses the hostpath
mode for the storage of all components. Although this configuration is simple, it is not suitable for large-scale Kubernetes environments where pods
may drift. After Rainbond is deployed, it provides easy-to-use shared storage that supports data sharing among multiple pods and across-host migration of pods. The original hostpath storage can be redefined. The redefined storage path will become empty, so remember to find a different path to perform data migration.
Application models allow IT technicians to focus more on the business rather than underlying complex tools. The final effect is to reduce the operation costs and difficulty in understanding, making Kubernetes easier to be implemented.
1,057 posts | 259 followers
FollowAlibaba Developer - June 3, 2020
Alibaba Developer - June 30, 2020
Alibaba Container Service - February 24, 2021
Alibaba Developer - July 8, 2021
Alibaba Container Service - February 21, 2023
Alibaba Cloud Native Community - December 26, 2022
1,057 posts | 259 followers
FollowAccelerate and secure the development, deployment, and management of containerized applications cost-effectively.
Learn MoreAlibaba Cloud Container Service for Kubernetes is a fully managed cloud container management service that supports native Kubernetes and integrates with other Alibaba Cloud products.
Learn MoreProvides a control plane to allow users to manage Kubernetes clusters that run based on different infrastructure resources
Learn MoreThis solution helps you improve and secure network and application access performance.
Learn MoreMore Posts by Alibaba Cloud Community
Dikky Ryan Pratama July 5, 2023 at 6:12 am
awesome!