Kubernetes APP
The MegaEase Cloud platform can host users' servers, support rapid deployment and management of common software service and cloud-native applications, and allow users to obtain a low-cost, high-availability cloud-native platform that is not locked by the platform.
This document introduces the basic operations of the MegaEase Cloud platform, including the installation of Kubernetes and its APP.
Deploy Kubernetes
The requirement to install Kubernetes App is to install the middleware Kubernetes cluster.
- Go to Services Page
- Click Create Service and select Kubernetes

- Select an available Kubernetes version
- The name is automatically generated, or you can write it manually
- Select Etcd Nodes CountćControl Plane CountćKube Node Count
- Select Host
- Select Networking plugin
- Do not change directories if not necessary
- Click Create to create Kubernetes cluster

Deploy Kubernetes App
- Go to App Page
- Click Create App,Select Kubernetes App

-
There are 3 ways to choose(whatever to be chosen, the final result is an YAML file)
- Upload the local YAML file
- Edit the template file
- Fill out forms step by step
-
Take Template file as an example, we provide a simple template

- Same as Mesh App, We use a complex stack
Takeoutappas an example to create Kubernetes App

- Click Submit
- Choose the corresponding Cluster Name

-
We could enable Mesh here If we want service governance
-
Click Next

- Click Create to create Stack
Besides, We could also create the same Stack by filling out forms:
- Choose Create Step by Step in step 3 above, and fill it out:

- Click Next to enter the page of Component

- Click button + below Components, then choose Component, then fill out the form of common properties

- Click Next to fill out the form of command and resources

- Click Next to fill out the form of access and configuration

- Click OK to save the component order-mesh

- And the other components restaurant-mesh and delivery-mesh could be created by similar steps.
Appendix
Takeoutapp complete codebaseļ¼Mesh Example (opens in a new tab).
we use Takeoutapp as an example to explain some obscure specs. Some unused specs in the component-level are explained in the component order-mesh.
takeoutapp.yaml:
name: takeoutapp
# Kubernetes namespace.
namespace: takeoutapp
cluster_name: kubernetes2c221c475
description: An application comprising of order, restaurant, delivery.
# Mesh related config.
easemesh:
enable: false
# Health check related config.
health_check_retry_times: 3
health_check_interval: 10s
# When stack status is under retrying state, it should delete old resources
# and redeploy it. The RetryMaxTime is maximum times value of retry deploy
# resource. When retrying times exceed this value, the stack status would
# changed to failed status
retry_max_time: 3
retry_interval: 30s
# Env applied to all components.
env_variables:
- name: STACK_NAME
value: takeoutapp
# pulse event frequency can be specified by user for advance option
# default value is 10 seconds
pulse_event_interval: 10s
# image_pull_secret_names is a credentials which kubernetes will use it to pull
# the image from the private registry. the value is copied from the cluster configuration.
image_pull_secret_names: {}
components:
# Order
- name: order-mesh
enable: true
image: megaease/meshdemo
image_version: latest
instance_count: 1
# IfNotPresent, Never, Always
image_pull_policy: IfNotPresent
# Stateless creates Deployment, Stateful creates StatefulSet
type: Stateless
# The first element of array map to kubernetes v1/Container command to entrypoint array,
# the remains elements map to v1/Container args to entrypoint array.
command: []
# liveness_probe_command is used to check if the component is healthy.
liveness_probe_command: []
# readiness_probe_command is used to check if the component is ready for traffic.
readiness_probe_command: []
# Current component launched after launching dependency components.
dependency_components: []
# Parts of volume from Kubernetes, so the naming convention is camel case.
# All types are the same as Kubernetes.
volumeMounts: []
volumeClaimTemplates: []
volumes: []
# Health check config for the component.
initial_delay_seconds: 10
probe_timeout_seconds: 5
probe_period_seconds: 5
health_check_retry_times: 3
health_check_interval: 10s
# The flag indicate whether component service is type NodePort.
is_node_port: true
annotations:
component_name: order-mesh
named_ports:
- name: http
port: 80
env_variables:
- name: SERVICE_NAME
value: order-mesh
- name: ZIPKIN_URL
value: https://monitor.megaease.com:32430/report/application-tracing-log
resource_require:
cpu: 200m
memory: 256Mi
resource_limit:
cpu: 1200m
memory: 2048Mi
configurations:
- key: listenPort
value: "7700"
use_as_file: /etc/port_config
is_sub_path: true
- key: listenAddr
value: 127.0.0.1
use_as_file: /etc/address_config
is_sub_path: true
# Restaurant
- name: restaurant-mesh
enable: true
image: megaease/meshdemo
image_version: latest
type: Stateless
instance_count: 1
named_ports:
- name: http
port: 80
env_variables:
- name: SERVICE_NAME
value: restaurant-mesh
- name: ZIPKIN_URL
value: https://monitor.megaease.com:32430/report/application-tracing-log
resource_require:
cpu: 200m
memory: 1Gi
resource_limit:
cpu: 2000m
memory: 3Gi
configurations:
- key: listenPort
value: "8800"
use_as_file: /etc/port_config
is_sub_path: true
- key: listenAddr
value: 0.0.0.0
use_as_file: /etc/address_config
is_sub_path: true
# Delivery
- name: delivery-mesh
enable: true
image: megaease/meshdemo
image_version: latest
type: Stateless
instance_count: 1
named_ports:
- name: http
port: 80
env_variables:
- name: SERVICE_NAME
value: delivery-mesh
- name: ZIPKIN_URL
value: https://monitor.megaease.com:32430/report/application-tracing-log
resource_require:
cpu: 200m
memory: 256Mi
resource_limit:
cpu: 1200m
memory: 2048Mi
configurations:
- key: listenPort
value: "9900"
use_as_file: /etc/port_config
is_sub_path: true
- key: listenAddr
value: 127.0.0.1
use_as_file: /etc/address_config
is_sub_path: true