Skip to main content

yaml file identification and creation

This document describes how to create k8s resources by uploading yaml files, and convert specific resources into the Rainbond abstraction layer. The following is a detailed list of supported resources by:

  • Component type resource:This type of resource will be converted into a component in Rainbond after the import is complete.
k8s resourcesRainbond model
Deploymentstateless components
StatefulSetstateful components
CronJobScheduled task component
Jobtask component
  • Component attribute resource:Some attribute values carried by the component type resource itself, such as Port, ConfigMap, volume, etc.
component propertiesRainbond model
nodeSelectorComponent special properties
labelsComponent special properties
tolerationsComponent special properties
volumesComponent special properties
serviceAccountNameComponent special properties
affinityComponent special properties
volumeMountComponent special properties/configuration files
privilegedComponent special properties
portcomponent port
HorizontalPodAutoscalersComponent scaling strategy
envEnvironment variables/component special properties
HealthyCheckManagementComponent Health Check

If the volumeMount of the component is mounted with a volume of type ConfigMap, it will be converted into the configuration file of the component.
If env is a reference type, Rainbond's environment variables will not be recognized.

  • All other resources are placed in the k8s resources under the application view.

There are two entries for yaml file resource identification and creation, which are newly added in the team view and added components in the application view.

  • team view
  • application view

Preconditions

  1. Familiar with the yaml file of k8s resources, prepare one or more yaml files of k8s resources.

  2. Check that the current team and app are where you want to be created.

The operation in the application view is the same as that in the team view. Here, the team view is used as an example for demonstration.

upload yaml

  1. Select Apply.

  2. upload yaml file

  3. After confirming that it is correct, click Create.

k8s resource name

  1. This part can identify all k8s resources, some resources can be converted into Rainbond resources, and other resources are all stored in the k8s resources under the application.

  2. After checking, click Next

Advanced Resource Identification

  1. On this page, you can see how the resources you deploy in the cluster correspond to each Rainbond module.Among them, Deployment, Job, Cronjob, and StatefulSet will be identified as components, and other resources such as Service and HPA will be correspondingly resolved into k8s resources in the application view.

  2. After confirmation, click Deploy.

  3. Deployment requires operations such as data storage, pulling images, etc., so it will take a long time. After a little wait, it will jump to the application view.