small fixes (#251)
This commit is contained in:
		
							parent
							
								
									5c6c6fd9de
								
							
						
					
					
						commit
						20a213317d
					
				| 
						 | 
				
			
			@ -1,5 +0,0 @@
 | 
			
		|||
---
 | 
			
		||||
title:  Build Extensive PaaS with KubeVela
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
TBD
 | 
			
		||||
| 
						 | 
				
			
			@ -2,8 +2,6 @@
 | 
			
		|||
title: Ingress
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
> ⚠️ This section requires your runtime cluster has a working ingress controller.
 | 
			
		||||
 | 
			
		||||
The `ingress` trait exposes a component to public Internet via a valid domain.
 | 
			
		||||
 | 
			
		||||
## Specification
 | 
			
		||||
| 
						 | 
				
			
			@ -108,3 +106,5 @@ Hello World
 | 
			
		|||
                             `'--.._\..--''
 | 
			
		||||
</xmp>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
> ⚠️ This section requires your runtime cluster has a working ingress controller.
 | 
			
		||||
| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
---
 | 
			
		||||
title: Rollout
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
This chapter will introduce how to use Rollout Trait to perform a rolling update on Workload.
 | 
			
		||||
 | 
			
		||||
## How to
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,9 +2,7 @@
 | 
			
		|||
title:  Service Binding
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
# Description
 | 
			
		||||
 | 
			
		||||
Service binding trait will bind data from Kubernetes `Secret` to the application container's ENV. 
 | 
			
		||||
Service binding trait will bind data from Kubernetes `Secret` to the application container's ENV.
 | 
			
		||||
 | 
			
		||||
## Specification
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,6 +9,7 @@ The `sidecar` trait allows you to attach a sidecar container to the component.
 | 
			
		|||
```shell
 | 
			
		||||
kubectl vela show sidecar
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
```console
 | 
			
		||||
# Properties
 | 
			
		||||
+---------+-----------------------------------------+-----------------------+----------+---------+
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,16 +13,17 @@ Requirements:
 | 
			
		|||
- Kubernetes cluster >= v1.18.0
 | 
			
		||||
- `kubectl` installed and configured
 | 
			
		||||
 | 
			
		||||
KubeVela relies on Kubernetes as control plane. The control plane could be any managed Kubernetes offering or your own cluster. The only requirement is please ensure [ingress-nginx](https://kubernetes.github.io/ingress-nginx/deploy/) is installed and enabled.
 | 
			
		||||
KubeVela relies on Kubernetes as control plane. The control plane could be any managed Kubernetes offering or your own cluster. 
 | 
			
		||||
 | 
			
		||||
For local deployment and test, you could use `minikube` or `kind`.
 | 
			
		||||
For local deployment and test, you could use `kind` or `minikube`. For production usage, you could use Kubernetes services provided by cloud providers.
 | 
			
		||||
 | 
			
		||||
<Tabs
 | 
			
		||||
className="unique-tabs"
 | 
			
		||||
defaultValue="minikube"
 | 
			
		||||
defaultValue="kind"
 | 
			
		||||
values={[
 | 
			
		||||
{label: 'Minikube', value: 'minikube'},
 | 
			
		||||
{label: 'Kind', value: 'kind'},
 | 
			
		||||
{label: 'Minikube', value: 'minikube'},
 | 
			
		||||
{label: 'Cloud Provider', value: 'cloudprovider'},
 | 
			
		||||
]}>
 | 
			
		||||
<TabItem value="minikube">
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -34,14 +35,16 @@ Then spins up a minikube cluster
 | 
			
		|||
minikube start
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Install ingress:
 | 
			
		||||
<details> <summary> Install ingress to enable service route </summary>
 | 
			
		||||
 | 
			
		||||
```shell script
 | 
			
		||||
minikube addons enable ingress
 | 
			
		||||
``` 
 | 
			
		||||
 | 
			
		||||
  </TabItem>
 | 
			
		||||
  <TabItem value="kind">
 | 
			
		||||
</details>
 | 
			
		||||
</TabItem>
 | 
			
		||||
 | 
			
		||||
<TabItem value="kind">
 | 
			
		||||
 | 
			
		||||
Follow [this guide](https://kind.sigs.k8s.io/docs/user/quick-start/#installation) to install kind.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -69,12 +72,25 @@ nodes:
 | 
			
		|||
EOF
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Then install [ingress for kind](https://kind.sigs.k8s.io/docs/user/ingress/#ingress-nginx):
 | 
			
		||||
<details> <summary> Install ingress to enable service route </summary>
 | 
			
		||||
 | 
			
		||||
```shell script
 | 
			
		||||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
  </TabItem>
 | 
			
		||||
</details>
 | 
			
		||||
</TabItem>
 | 
			
		||||
 | 
			
		||||
<TabItem value="cloudprovider">
 | 
			
		||||
 | 
			
		||||
* Alibaba Cloud [ACK Service](https://www.aliyun.com/product/kubernetes)
 | 
			
		||||
* AWS [EKS Service](https://aws.amazon.com/cn/eks)
 | 
			
		||||
* Azure [AKS Service](https://azure.microsoft.com/en-us/services/kubernetes-service)
 | 
			
		||||
* Google [GKE Service](https://cloud.google.com/kubernetes-engine)
 | 
			
		||||
 | 
			
		||||
> Please ensure [ingress-nginx](https://kubernetes.github.io/ingress-nginx/deploy/) is installed and enabled.
 | 
			
		||||
 | 
			
		||||
</TabItem>  
 | 
			
		||||
</Tabs>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -94,8 +110,7 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/mast
 | 
			
		|||
    ```shell script
 | 
			
		||||
    helm install --create-namespace -n vela-system kubevela kubevela/vela-core
 | 
			
		||||
    ```
 | 
			
		||||
    By default, it will enable the webhook with a self-signed certificate provided by [kube-webhook-certgen](https://github.com/jet/kube-webhook-certgen).
 | 
			
		||||
    You can also [install it with `cert-manager`](../platform-engineers/advanced-install#install-kubevela-with-cert-manager).
 | 
			
		||||
    You can refer to [advanced installation guide](../platform-engineers/advanced-install) for more custom ways.
 | 
			
		||||
 | 
			
		||||
4. Verify chart installed successfully
 | 
			
		||||
    ```shell script
 | 
			
		||||
| 
						 | 
				
			
			@ -200,26 +215,85 @@ please at least enable following addons to make sure KubeVela functioning well:
 | 
			
		|||
 | 
			
		||||
## 5. Verify
 | 
			
		||||
 | 
			
		||||
Checking available application components and traits by `vela` CLI tool:
 | 
			
		||||
* Get built-in component types by `vela` CLI:
 | 
			
		||||
  ```shell script
 | 
			
		||||
  vela components
 | 
			
		||||
  ```
 | 
			
		||||
    <details> <summary> Outputs </summary>
 | 
			
		||||
 | 
			
		||||
```shell script
 | 
			
		||||
vela components
 | 
			
		||||
```
 | 
			
		||||
```console
 | 
			
		||||
NAME      	NAMESPACE  	WORKLOAD        	DESCRIPTION
 | 
			
		||||
task      	vela-system	jobs.batch      	Describes jobs that run code or a script to completion.
 | 
			
		||||
webservice	vela-system	deployments.apps	Describes long-running, scalable, containerized services
 | 
			
		||||
          	           	                	that have a stable network endpoint to receive external
 | 
			
		||||
          	           	                	network traffic from customers.
 | 
			
		||||
worker    	vela-system	deployments.apps	Describes long-running, scalable, containerized services
 | 
			
		||||
          	           	                	that running at backend. They do NOT have network endpoint
 | 
			
		||||
          	           	                	to receive external network traffic.
 | 
			
		||||
```
 | 
			
		||||
    ```console
 | 
			
		||||
    NAME        	NAMESPACE  	WORKLOAD                             	DESCRIPTION
 | 
			
		||||
    alibaba-ack 	vela-system	configurations.terraform.core.oam.dev	Terraform configuration for Alibaba Cloud ACK cluster
 | 
			
		||||
    alibaba-oss 	vela-system	configurations.terraform.core.oam.dev	Terraform configuration for Alibaba Cloud OSS object
 | 
			
		||||
    alibaba-rds 	vela-system	configurations.terraform.core.oam.dev	Terraform configuration for Alibaba Cloud RDS object
 | 
			
		||||
    helm        	vela-system	autodetects.core.oam.dev             	helm release is a group of K8s resources from either git
 | 
			
		||||
                                                                    repository or helm repo
 | 
			
		||||
    kustomize   	vela-system	autodetects.core.oam.dev             	kustomize can fetching, building, updating and applying
 | 
			
		||||
                                                                    Kustomize manifests from git repo.
 | 
			
		||||
    raw         	vela-system	autodetects.core.oam.dev             	raw allow users to specify raw K8s object in properties
 | 
			
		||||
    task        	vela-system	jobs.batch                           	Describes jobs that run code or a script to completion.
 | 
			
		||||
    webservice  	vela-system	deployments.apps                     	Describes long-running, scalable, containerized services
 | 
			
		||||
                                                                    that have a stable network endpoint to receive external
 | 
			
		||||
                                                                    network traffic from customers.
 | 
			
		||||
    worker      	vela-system	deployments.apps                     	Describes long-running, scalable, containerized services
 | 
			
		||||
                                                                    that running at backend. They do NOT have network endpoint
 | 
			
		||||
                                                                    to receive external network traffic.
 | 
			
		||||
    ```
 | 
			
		||||
 | 
			
		||||
  </details>
 | 
			
		||||
 | 
			
		||||
* Get built-in traits by `vela` CLI:
 | 
			
		||||
  ```shell script
 | 
			
		||||
  vela traits
 | 
			
		||||
  ```
 | 
			
		||||
    <details> <summary> Outputs </summary>
 | 
			
		||||
 | 
			
		||||
    ```console
 | 
			
		||||
    NAME                    	NAMESPACE  	APPLIES-TO       	CONFLICTS-WITH	POD-DISRUPTIVE	DESCRIPTION
 | 
			
		||||
    annotations             	vela-system	*                	              	true          	Add annotations on K8s pod for your workload which follows
 | 
			
		||||
                                                                                            the pod spec in path 'spec.template'.
 | 
			
		||||
    configmap               	vela-system	*                	              	true          	Create/Attach configmaps on K8s pod for your workload which
 | 
			
		||||
                                                                                            follows the pod spec in path 'spec.template'.
 | 
			
		||||
    cpuscaler               	vela-system	deployments.apps 	              	false         	Automatically scale the component based on CPU usage.
 | 
			
		||||
    env                     	vela-system	*                	              	false         	add env on K8s pod for your workload which follows the pod
 | 
			
		||||
                                                                                            spec in path 'spec.template.'
 | 
			
		||||
    expose                  	vela-system	                 	              	false         	Expose port to enable web traffic for your component.
 | 
			
		||||
    hostalias               	vela-system	*                	              	false         	Add host aliases on K8s pod for your workload which follows
 | 
			
		||||
                                                                                            the pod spec in path 'spec.template'.
 | 
			
		||||
    ingress                 	vela-system	                 	              	false         	Enable public web traffic for the component.
 | 
			
		||||
    ingress-1-20            	vela-system	                 	              	false         	Enable public web traffic for the component, the ingress API
 | 
			
		||||
                                                                                            matches K8s v1.20+.
 | 
			
		||||
    init-container          	vela-system	deployments.apps 	              	true          	add an init container and use shared volume with pod
 | 
			
		||||
    kustomize-json-patch    	vela-system	                 	              	false         	A list of JSON6902 patch to selected target
 | 
			
		||||
    kustomize-patch         	vela-system	                 	              	false         	A list of StrategicMerge or JSON6902 patch to selected
 | 
			
		||||
                                                                                            target
 | 
			
		||||
    kustomize-strategy-merge	vela-system	                 	              	false         	A list of strategic merge to kustomize config
 | 
			
		||||
    labels                  	vela-system	*                	              	true          	Add labels on K8s pod for your workload which follows the
 | 
			
		||||
                                                                                            pod spec in path 'spec.template'.
 | 
			
		||||
    lifecycle               	vela-system	*                	              	true          	Add lifecycle hooks for the first container of K8s pod for
 | 
			
		||||
                                                                                            your workload which follows the pod spec in path
 | 
			
		||||
                                                                                            'spec.template'.
 | 
			
		||||
    node-affinity           	vela-system	*                	              	true          	affinity specify node affinity and toleration on K8s pod for
 | 
			
		||||
                                                                                            your workload which follows the pod spec in path
 | 
			
		||||
                                                                                            'spec.template'.
 | 
			
		||||
    pvc                     	vela-system	deployments.apps 	              	true          	Create a Persistent Volume Claim and mount the PVC as volume
 | 
			
		||||
                                                                                            to the  first container in the pod
 | 
			
		||||
    resource                	vela-system	*                	              	true          	Add resource requests and limits on K8s pod for your
 | 
			
		||||
                                                                                            workload which follows the pod spec in path 'spec.template.'
 | 
			
		||||
    rollout                 	vela-system	                 	              	false         	rollout the component
 | 
			
		||||
    scaler                  	vela-system	*                	              	false         	Manually scale K8s pod for your workload which follows the
 | 
			
		||||
                                                                                            pod spec in path 'spec.template'.
 | 
			
		||||
    service-binding         	vela-system	webservice,worker	              	false         	Binding secrets of cloud resources to component env
 | 
			
		||||
    sidecar                 	vela-system	*                	              	true          	Inject a sidecar container to K8s pod for your workload
 | 
			
		||||
                                                                                            which follows the pod spec in path 'spec.template'.
 | 
			
		||||
    volumes                 	vela-system	deployments.apps 	              	true          	Add volumes on K8s pod for your workload which follows the
 | 
			
		||||
                                                                                            pod spec in path 'spec.template'.
 | 
			
		||||
    ```
 | 
			
		||||
 | 
			
		||||
    </details>
 | 
			
		||||
 | 
			
		||||
These capabilities are built-in so they are ready to use if showed up. KubeVela is designed to be programmable and fully self-service, so the assumption is more capabilities will be added later per your own needs. 
 | 
			
		||||
 | 
			
		||||
Also, whenever new capabilities are added in the platform, you will immediately see them in above output.
 | 
			
		||||
 | 
			
		||||
## What's Next
 | 
			
		||||
 | 
			
		||||
* Start to [deploy our first application](./first-application).
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,8 @@ import TabItem from '@theme/TabItem';
 | 
			
		|||
 | 
			
		||||
## Install KubeVela with cert-manager
 | 
			
		||||
 | 
			
		||||
KubeVela can use cert-manager generate certs for your application if it's available. Note that you need to install cert-manager **before** the KubeVela chart.
 | 
			
		||||
By default, KubeVela will use a self-signed certificate provided by [kube-webhook-certgen](https://github.com/jet/kube-webhook-certgen) for admissionWebhooks.
 | 
			
		||||
You can also use cert-manager if it's available. Note that you need to install cert-manager **before** the KubeVela chart.
 | 
			
		||||
 | 
			
		||||
```shell script
 | 
			
		||||
helm repo add jetstack https://charts.jetstack.io
 | 
			
		||||
| 
						 | 
				
			
			@ -141,6 +142,39 @@ kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/v1.1.0/chart
 | 
			
		|||
helm upgrade --install --create-namespace --namespace vela-system  kubevela kubevela/vela-core --version <the_new_version>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Addons
 | 
			
		||||
 | 
			
		||||
| Name                  | Description                                             | capability        | Open Source Project Reference                                        |
 | 
			
		||||
|---------------------|-------------------------------------------------|----------------|-------------------------------------------------|
 | 
			
		||||
| terraform           | Basic addon to Provide Cloud Resources(installed by default)                                    | -              | https://github.com/oam-dev/terraform-controller |
 | 
			
		||||
| fluxcd              | Support Deployment of Helm and Kustomize components                       | kustomize、helm | https://fluxcd.io/                              |
 | 
			
		||||
| kruise              | Support more powerful workload feature                     | cloneset       | https://openkruise.io/                          |
 | 
			
		||||
| prometheus          | Support basic observability from Promethus                           | -              | https://prometheus.io/                          |
 | 
			
		||||
| keda                | Support event driven auto scaling                            | -              | https://keda.sh/                                |
 | 
			
		||||
| ocm                 | Support Multi-cluster Application Deployment                                  | -              | http://open-cluster-management.io/              |
 | 
			
		||||
| observability       | Support KubeVela core observability     | -              | -                                               |
 | 
			
		||||
 | 
			
		||||
1. Search all addons 
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
vela addon list
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
2. Install addons (use fluxcd as example)
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
vela addon enable fluxcd
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
3. Disable addons
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
vela addon disable fluxcd
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Please remove all application using this addon before disable it.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Clean Up
 | 
			
		||||
 | 
			
		||||
Run:
 | 
			
		||||
| 
						 | 
				
			
			@ -184,34 +218,3 @@ Then clean up CRDs (CRDs are not removed via helm by default):
 | 
			
		|||
  workloaddefinitions.core.oam.dev 
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Addons
 | 
			
		||||
 | 
			
		||||
| Name                  | Description                                             | capability        | Open Source Project Reference                                        |
 | 
			
		||||
|---------------------|-------------------------------------------------|----------------|-------------------------------------------------|
 | 
			
		||||
| terraform           | Basic addon to Provide Cloud Resources(installed by default)                                    | -              | https://github.com/oam-dev/terraform-controller |
 | 
			
		||||
| fluxcd              | Support Deployment of Helm and Kustomize components                       | kustomize、helm | https://fluxcd.io/                              |
 | 
			
		||||
| kruise              | Support more powerful workload feature                     | cloneset       | https://openkruise.io/                          |
 | 
			
		||||
| prometheus          | Support basic observability from Promethus                           | -              | https://prometheus.io/                          |
 | 
			
		||||
| keda                | Support event driven auto scaling                            | -              | https://keda.sh/                                |
 | 
			
		||||
| ocm                 | Support Multi-cluster Application Deployment                                  | -              | http://open-cluster-management.io/              |
 | 
			
		||||
| observability       | Support KubeVela core observability     | -              | -                                               |
 | 
			
		||||
 | 
			
		||||
1. Search all addons 
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
vela addon list
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
2. Install addons (use fluxcd as example)
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
vela addon enable fluxcd
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
3. Disable addons
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
vela addon disable fluxcd
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Please remove all application using this addon before disable it.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +0,0 @@
 | 
			
		|||
---
 | 
			
		||||
title:  易用可扩展的 PaaS
 | 
			
		||||
---
 | 
			
		||||
| 
						 | 
				
			
			@ -15,39 +15,37 @@ import TabItem from '@theme/TabItem';
 | 
			
		|||
 | 
			
		||||
KubeVela 得以成为控制平面,主要是依赖 Kubernetes 。它可以放置在任何托管 Kubernetes 作为底座的产品或你自己的集群中。
 | 
			
		||||
 | 
			
		||||
下面,我们使用 minikube 或 kind 在本地部署、测试来熟悉学习 KubeVela,
 | 
			
		||||
 | 
			
		||||
> 注意: 如果你不是使用 minikube 或 kind 来进行学习,请确保[安装或启用 ingress-nginx](https://kubernetes.github.io/ingress-nginx/deploy/)。
 | 
			
		||||
你可以使用 kind 或 minikube 在本地部署、测试 KubeVela,或者使用云厂商提供的 Kubernetes 服务做生产部署。
 | 
			
		||||
 | 
			
		||||
<Tabs
 | 
			
		||||
className="unique-tabs"
 | 
			
		||||
defaultValue="minikube"
 | 
			
		||||
defaultValue="kind"
 | 
			
		||||
values={[
 | 
			
		||||
{label: 'Kind', value: 'kind'},
 | 
			
		||||
{label: 'Minikube', value: 'minikube'},
 | 
			
		||||
{label: 'KinD', value: 'kind'},
 | 
			
		||||
{label: 'Cloud Provider', value: 'cloudprovider'},
 | 
			
		||||
]}>
 | 
			
		||||
 | 
			
		||||
<TabItem value="minikube">
 | 
			
		||||
 | 
			
		||||
先使用 minikube [安装指南](https://minikube.sigs.k8s.io/docs/start/)。
 | 
			
		||||
 | 
			
		||||
安装 minikube 后,创建一个集群:
 | 
			
		||||
[安装 minikube](https://minikube.sigs.k8s.io/docs/start/) 后,创建一个集群:
 | 
			
		||||
 | 
			
		||||
```shell script
 | 
			
		||||
minikube start
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
安装 ingress:
 | 
			
		||||
<details> <summary> 安装 ingress 启用路由访问功能 </summary>
 | 
			
		||||
 | 
			
		||||
```shell script
 | 
			
		||||
minikube addons enable ingress
 | 
			
		||||
``` 
 | 
			
		||||
 | 
			
		||||
  </TabItem>
 | 
			
		||||
  <TabItem value="kind">
 | 
			
		||||
</details>
 | 
			
		||||
</TabItem>
 | 
			
		||||
 | 
			
		||||
请按照本[指南](https://kind.sigs.k8s.io/docs/user/quick-start/#installation)进行安装。
 | 
			
		||||
<TabItem value="kind">
 | 
			
		||||
 | 
			
		||||
然后拉起一个 kind 集群:
 | 
			
		||||
安装 [Kind 命令行工具](https://kind.sigs.k8s.io/docs/user/quick-start/#installation)后,创建集群:
 | 
			
		||||
 | 
			
		||||
```shell script
 | 
			
		||||
cat <<EOF | kind create cluster --image=kindest/node:v1.18.15 --config=-
 | 
			
		||||
| 
						 | 
				
			
			@ -71,39 +69,54 @@ nodes:
 | 
			
		|||
EOF
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
然后安装 [ingress for kind](https://kind.sigs.k8s.io/docs/user/ingress/#ingress-nginx):
 | 
			
		||||
<details> <summary> 安装 ingress 启用路由访问功能 </summary>
 | 
			
		||||
 | 
			
		||||
```shell script
 | 
			
		||||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
</details>
 | 
			
		||||
 | 
			
		||||
  </TabItem>
 | 
			
		||||
 | 
			
		||||
<TabItem value="cloudprovider">
 | 
			
		||||
 | 
			
		||||
* 阿里云 [ACK 服务](https://www.aliyun.com/product/kubernetes)
 | 
			
		||||
* AWS [EKS 服务](https://aws.amazon.com/cn/eks)
 | 
			
		||||
* Azure [AKS 服务](https://azure.microsoft.com/en-us/services/kubernetes-service)
 | 
			
		||||
* Google [GKE 服务](https://cloud.google.com/kubernetes-engine)
 | 
			
		||||
 | 
			
		||||
> 注意: 请确保云厂商的集群[已安装或启用 ingress-nginx](https://kubernetes.github.io/ingress-nginx/deploy/) 以保证路由访问功能可正常使用。
 | 
			
		||||
 | 
			
		||||
</TabItem>
 | 
			
		||||
</Tabs>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## 2. 安装 KubeVela
 | 
			
		||||
 | 
			
		||||
1. 添加 KubeVela helm chart 仓库
 | 
			
		||||
```shell script
 | 
			
		||||
helm repo add kubevela https://charts.kubevela.net/core
 | 
			
		||||
```
 | 
			
		||||
  ```shell script
 | 
			
		||||
  helm repo add kubevela https://charts.kubevela.net/core
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
2. 更新 chart 仓库
 | 
			
		||||
```shell script
 | 
			
		||||
helm repo update
 | 
			
		||||
```
 | 
			
		||||
  ```shell script
 | 
			
		||||
  helm repo update
 | 
			
		||||
  ```
 | 
			
		||||
   
 | 
			
		||||
3. 安装 KubeVela
 | 
			
		||||
```shell script
 | 
			
		||||
helm install --create-namespace -n vela-system kubevela kubevela/vela-core
 | 
			
		||||
```
 | 
			
		||||
默认情况下,它将使用 [kube-webhook-certgen](https://github.com/jet/kube-webhook-certgen) 提供的自签名证书启用 webhook。你也可以用 [`cert-manager`](../platform-engineers/advanced-install#install-kubevela-with-cert-manager) 安装。
 | 
			
		||||
  ```shell script
 | 
			
		||||
  helm install --create-namespace -n vela-system kubevela kubevela/vela-core
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
你可以参考 [`自定义安装`](../platform-engineers/advanced-install) 获取更多安装模式和功能。
 | 
			
		||||
 | 
			
		||||
4. 验证 chart 安装是否成功
 | 
			
		||||
    ```shell script
 | 
			
		||||
    helm test kubevela -n vela-system
 | 
			
		||||
    ```
 | 
			
		||||
 | 
			
		||||
    <details> <summary> 可以点开看看输出会是什么样子 </summary>
 | 
			
		||||
    <details> <summary> 点击查看期望输出 </summary>
 | 
			
		||||
 | 
			
		||||
    ```shell
 | 
			
		||||
    Pod kubevela-application-test pending
 | 
			
		||||
| 
						 | 
				
			
			@ -191,8 +204,7 @@ sudo mv ./vela /usr/local/bin/vela
 | 
			
		|||
 | 
			
		||||
## 4. 安装插件
 | 
			
		||||
 | 
			
		||||
KubeVela 支持一系列[开箱即用的插件](../platform-engineers/advanced-install#插件列表),
 | 
			
		||||
为保证 KubeVela 相关功能正常使用,建议您至少开启以下插件:
 | 
			
		||||
KubeVela 支持一系列[开箱即用的插件](../platform-engineers/advanced-install#插件列表),建议您至少开启以下插件:
 | 
			
		||||
 | 
			
		||||
* Helm 以及 Kustomize 组件功能插件
 | 
			
		||||
  ```shell
 | 
			
		||||
| 
						 | 
				
			
			@ -200,28 +212,88 @@ KubeVela 支持一系列[开箱即用的插件](../platform-engineers/advanced-i
 | 
			
		|||
  ```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## 5. 验证是否安装成功
 | 
			
		||||
## 5. 查看已安装能力
 | 
			
		||||
 | 
			
		||||
通过 `vela` CLI 来看看有哪些应用程序的组件和特征:
 | 
			
		||||
* 通过 `vela` CLI 来看看有哪些组件类型:
 | 
			
		||||
  ```shell script
 | 
			
		||||
  vela components
 | 
			
		||||
  ```
 | 
			
		||||
    <details> <summary> 查看输出 </summary>
 | 
			
		||||
 | 
			
		||||
    ```console
 | 
			
		||||
    NAME        	NAMESPACE  	WORKLOAD                             	DESCRIPTION
 | 
			
		||||
    alibaba-ack 	vela-system	configurations.terraform.core.oam.dev	Terraform configuration for Alibaba Cloud ACK cluster
 | 
			
		||||
    alibaba-oss 	vela-system	configurations.terraform.core.oam.dev	Terraform configuration for Alibaba Cloud OSS object
 | 
			
		||||
    alibaba-rds 	vela-system	configurations.terraform.core.oam.dev	Terraform configuration for Alibaba Cloud RDS object
 | 
			
		||||
    helm        	vela-system	autodetects.core.oam.dev             	helm release is a group of K8s resources from either git
 | 
			
		||||
                                                                    repository or helm repo
 | 
			
		||||
    kustomize   	vela-system	autodetects.core.oam.dev             	kustomize can fetching, building, updating and applying
 | 
			
		||||
                                                                    Kustomize manifests from git repo.
 | 
			
		||||
    raw         	vela-system	autodetects.core.oam.dev             	raw allow users to specify raw K8s object in properties
 | 
			
		||||
    task        	vela-system	jobs.batch                           	Describes jobs that run code or a script to completion.
 | 
			
		||||
    webservice  	vela-system	deployments.apps                     	Describes long-running, scalable, containerized services
 | 
			
		||||
                                                                    that have a stable network endpoint to receive external
 | 
			
		||||
                                                                    network traffic from customers.
 | 
			
		||||
    worker      	vela-system	deployments.apps                     	Describes long-running, scalable, containerized services
 | 
			
		||||
                                                                    that running at backend. They do NOT have network endpoint
 | 
			
		||||
                                                                    to receive external network traffic.
 | 
			
		||||
    ```
 | 
			
		||||
 | 
			
		||||
  </details>
 | 
			
		||||
 | 
			
		||||
* 通过 `vela` CLI 来看看有哪些运维功能:
 | 
			
		||||
  ```shell script
 | 
			
		||||
  vela traits
 | 
			
		||||
  ```
 | 
			
		||||
    <details> <summary> 查看输出 </summary>
 | 
			
		||||
 | 
			
		||||
    ```console
 | 
			
		||||
    NAME                    	NAMESPACE  	APPLIES-TO       	CONFLICTS-WITH	POD-DISRUPTIVE	DESCRIPTION
 | 
			
		||||
    annotations             	vela-system	*                	              	true          	Add annotations on K8s pod for your workload which follows
 | 
			
		||||
                                                                                            the pod spec in path 'spec.template'.
 | 
			
		||||
    configmap               	vela-system	*                	              	true          	Create/Attach configmaps on K8s pod for your workload which
 | 
			
		||||
                                                                                            follows the pod spec in path 'spec.template'.
 | 
			
		||||
    cpuscaler               	vela-system	deployments.apps 	              	false         	Automatically scale the component based on CPU usage.
 | 
			
		||||
    env                     	vela-system	*                	              	false         	add env on K8s pod for your workload which follows the pod
 | 
			
		||||
                                                                                            spec in path 'spec.template.'
 | 
			
		||||
    expose                  	vela-system	                 	              	false         	Expose port to enable web traffic for your component.
 | 
			
		||||
    hostalias               	vela-system	*                	              	false         	Add host aliases on K8s pod for your workload which follows
 | 
			
		||||
                                                                                            the pod spec in path 'spec.template'.
 | 
			
		||||
    ingress                 	vela-system	                 	              	false         	Enable public web traffic for the component.
 | 
			
		||||
    ingress-1-20            	vela-system	                 	              	false         	Enable public web traffic for the component, the ingress API
 | 
			
		||||
                                                                                            matches K8s v1.20+.
 | 
			
		||||
    init-container          	vela-system	deployments.apps 	              	true          	add an init container and use shared volume with pod
 | 
			
		||||
    kustomize-json-patch    	vela-system	                 	              	false         	A list of JSON6902 patch to selected target
 | 
			
		||||
    kustomize-patch         	vela-system	                 	              	false         	A list of StrategicMerge or JSON6902 patch to selected
 | 
			
		||||
                                                                                            target
 | 
			
		||||
    kustomize-strategy-merge	vela-system	                 	              	false         	A list of strategic merge to kustomize config
 | 
			
		||||
    labels                  	vela-system	*                	              	true          	Add labels on K8s pod for your workload which follows the
 | 
			
		||||
                                                                                            pod spec in path 'spec.template'.
 | 
			
		||||
    lifecycle               	vela-system	*                	              	true          	Add lifecycle hooks for the first container of K8s pod for
 | 
			
		||||
                                                                                            your workload which follows the pod spec in path
 | 
			
		||||
                                                                                            'spec.template'.
 | 
			
		||||
    node-affinity           	vela-system	*                	              	true          	affinity specify node affinity and toleration on K8s pod for
 | 
			
		||||
                                                                                            your workload which follows the pod spec in path
 | 
			
		||||
                                                                                            'spec.template'.
 | 
			
		||||
    pvc                     	vela-system	deployments.apps 	              	true          	Create a Persistent Volume Claim and mount the PVC as volume
 | 
			
		||||
                                                                                            to the  first container in the pod
 | 
			
		||||
    resource                	vela-system	*                	              	true          	Add resource requests and limits on K8s pod for your
 | 
			
		||||
                                                                                            workload which follows the pod spec in path 'spec.template.'
 | 
			
		||||
    rollout                 	vela-system	                 	              	false         	rollout the component
 | 
			
		||||
    scaler                  	vela-system	*                	              	false         	Manually scale K8s pod for your workload which follows the
 | 
			
		||||
                                                                                            pod spec in path 'spec.template'.
 | 
			
		||||
    service-binding         	vela-system	webservice,worker	              	false         	Binding secrets of cloud resources to component env
 | 
			
		||||
    sidecar                 	vela-system	*                	              	true          	Inject a sidecar container to K8s pod for your workload
 | 
			
		||||
                                                                                            which follows the pod spec in path 'spec.template'.
 | 
			
		||||
    volumes                 	vela-system	deployments.apps 	              	true          	Add volumes on K8s pod for your workload which follows the
 | 
			
		||||
                                                                                            pod spec in path 'spec.template'.
 | 
			
		||||
    ```
 | 
			
		||||
 | 
			
		||||
    </details>
 | 
			
		||||
 | 
			
		||||
```shell script
 | 
			
		||||
vela components
 | 
			
		||||
```
 | 
			
		||||
```console
 | 
			
		||||
NAME      	NAMESPACE  	WORKLOAD        	DESCRIPTION
 | 
			
		||||
task      	vela-system	jobs.batch      	Describes jobs that run code or a script to completion.
 | 
			
		||||
webservice	vela-system	deployments.apps	Describes long-running, scalable, containerized services
 | 
			
		||||
          	           	                	that have a stable network endpoint to receive external
 | 
			
		||||
          	           	                	network traffic from customers.
 | 
			
		||||
worker    	vela-system	deployments.apps	Describes long-running, scalable, containerized services
 | 
			
		||||
          	           	                	that running at backend. They do NOT have network endpoint
 | 
			
		||||
          	           	                	to receive external network traffic.
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
以上的这些能力都是已经内置的,随取随用。而由于 KubeVela 从一开始就被设计成可编程的,你可以按玩乐高积木一样,添加任何你需要的功能。
 | 
			
		||||
 | 
			
		||||
并且,一旦这些自定力的能力被加入到 KubeVela 控制平面中,你立即就能从上面的输出中看到了。
 | 
			
		||||
 | 
			
		||||
## 下一步
 | 
			
		||||
 | 
			
		||||
* 安装完毕 KubeVela,开始动手编写[第一个应用部署计划](./first-application)。
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,7 +4,10 @@ title:  自定义安装
 | 
			
		|||
 | 
			
		||||
## 带着证书管理器安装 KubeVela
 | 
			
		||||
 | 
			
		||||
KubeVela 可以使用证书管理器为你的应用生成证书,但是你需要提前安装好证书管理器。
 | 
			
		||||
默认情况下,KubeVela 使用 [kube-webhook-certgen](https://github.com/jet/kube-webhook-certgen) 提供的自签名证书以便使用参数校验等 Webhook 功能。
 | 
			
		||||
你可以对接证书管理软件(Cert Manager),但是你需要提前安装好。
 | 
			
		||||
 | 
			
		||||
1. 安装 Cert Manager (如果已经安装,可省略)
 | 
			
		||||
 | 
			
		||||
```shell script
 | 
			
		||||
helm repo add jetstack https://charts.jetstack.io
 | 
			
		||||
| 
						 | 
				
			
			@ -12,7 +15,7 @@ helm repo update
 | 
			
		|||
helm install cert-manager jetstack/cert-manager --namespace cert-manager --version v1.2.0 --create-namespace --set installCRDs=true
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
安装 KubeVela 同时启用证书管理器:
 | 
			
		||||
2. 安装 KubeVela 同时启用证书管理器:
 | 
			
		||||
 | 
			
		||||
```shell script
 | 
			
		||||
helm install --create-namespace -n vela-system --set admissionWebhooks.certManager.enabled=true kubevela kubevela/vela-core
 | 
			
		||||
| 
						 | 
				
			
			@ -100,6 +103,39 @@ kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/v1.1.0/chart
 | 
			
		|||
helm upgrade --install --create-namespace --namespace vela-system  kubevela kubevela/vela-core --version <the_new_version>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## 插件列表
 | 
			
		||||
 | 
			
		||||
| 插件                  | 简介                                              | 对应的内置功能        | 插件对应开源项目                                        |
 | 
			
		||||
|---------------------|-------------------------------------------------|----------------|-------------------------------------------------|
 | 
			
		||||
| terraform           | 提供云资源(默认已安装)                                    | -              | https://github.com/oam-dev/terraform-controller |
 | 
			
		||||
| fluxcd              | 提供 Helm、Kustomize 组件的部署功能                       | kustomize、helm | https://fluxcd.io/                              |
 | 
			
		||||
| kruise              | 提供比 Kubernetes 原生更强大的工作负载套件                     | cloneset       | https://openkruise.io/                          |
 | 
			
		||||
| prometheus          | 提供基于 Promethus 的基础监控功能                          | -              | https://prometheus.io/                          |
 | 
			
		||||
| keda                | 提供基于事件驱动的工作负载自动扩缩容功能                            | -              | https://keda.sh/                                |
 | 
			
		||||
| ocm                 | 提供多集群功能的系统插件                                    | -              | http://open-cluster-management.io/              |
 | 
			
		||||
| observability       | 为 KubeVela core 提供系统级别的监控,也可以为应用提供业务级别的监控。      | -              | -                                               |
 | 
			
		||||
 | 
			
		||||
1. 查看可用的插件
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
vela addon list
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
2. 安装插件,以 fluxcd 插件为例
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
vela addon enable fluxcd
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
3. 禁用插件
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
vela addon disable fluxcd
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
禁用前请先清理使用插件功能的应用,否则将禁用失败。
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## 卸载
 | 
			
		||||
 | 
			
		||||
运行命令:
 | 
			
		||||
| 
						 | 
				
			
			@ -140,35 +176,3 @@ rm -r ~/.vela
 | 
			
		|||
  workflowstepdefinitions.core.oam.dev \
 | 
			
		||||
  workloaddefinitions.core.oam.dev 
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## 插件列表
 | 
			
		||||
 | 
			
		||||
| 插件                  | 简介                                              | 对应的内置功能        | 插件对应开源项目                                        |
 | 
			
		||||
|---------------------|-------------------------------------------------|----------------|-------------------------------------------------|
 | 
			
		||||
| terraform           | 提供云资源(默认已安装)                                    | -              | https://github.com/oam-dev/terraform-controller |
 | 
			
		||||
| fluxcd              | 提供 Helm、Kustomize 组件的部署功能                       | kustomize、helm | https://fluxcd.io/                              |
 | 
			
		||||
| kruise              | 提供比 Kubernetes 原生更强大的工作负载套件                     | cloneset       | https://openkruise.io/                          |
 | 
			
		||||
| prometheus          | 提供基于 Promethus 的基础监控功能                          | -              | https://prometheus.io/                          |
 | 
			
		||||
| keda                | 提供基于事件驱动的工作负载自动扩缩容功能                            | -              | https://keda.sh/                                |
 | 
			
		||||
| ocm                 | 提供多集群功能的系统插件                                    | -              | http://open-cluster-management.io/              |
 | 
			
		||||
| observability       | 为 KubeVela core 提供系统级别的监控,也可以为应用提供业务级别的监控。      | -              | -                                               |
 | 
			
		||||
 | 
			
		||||
1. 查看可用的插件
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
vela addon list
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
2. 安装插件,以 fluxcd 插件为例
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
vela addon enable fluxcd
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
3. 禁用插件
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
vela addon disable fluxcd
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
禁用前请先清理使用插件功能的应用,否则将禁用失败。
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,9 +7,6 @@ KubeVela 中的 Trait 特性可以从基于Helm的组件无缝添加.
 | 
			
		|||
在以下应用实例中,我们将基于 Helm 组件添加两个 Trait 特性 [scaler](https://github.com/oam-dev/kubevela/blob/master/charts/vela-core/templates/defwithtemplate/manualscale.yaml) 和 [virtualgroup](https://github.com/oam-dev/kubevela/blob/master/docs/examples/helm-module/virtual-group-td.yaml).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
```yaml
 | 
			
		||||
apiVersion: core.oam.dev/v1beta1
 | 
			
		||||
kind: Application
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										23
									
								
								sidebars.js
								
								
								
								
							
							
						
						
									
										23
									
								
								sidebars.js
								
								
								
								
							| 
						 | 
				
			
			@ -101,6 +101,17 @@ module.exports = {
 | 
			
		|||
        },
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      type: 'category',
 | 
			
		||||
      label: 'Case Studies',
 | 
			
		||||
      collapsed: false,
 | 
			
		||||
      items: [
 | 
			
		||||
        'case-studies/jenkins-cicd'
 | 
			
		||||
        //        'case-studies/workflow-edge-computing', // 待完成
 | 
			
		||||
        //        'case-studies/li-auto-inc', 暂时下掉,应该改写成一个 10 - 15 分钟体验的产品 lab 例子
 | 
			
		||||
        //        'case-studies/workflow-with-ocm',
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      type: 'category',
 | 
			
		||||
      label: 'Platform Admin Guide',
 | 
			
		||||
| 
						 | 
				
			
			@ -169,18 +180,6 @@ module.exports = {
 | 
			
		|||
        'platform-engineers/advanced-install',
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      type: 'category',
 | 
			
		||||
      label: 'Case Studies',
 | 
			
		||||
      collapsed: false,
 | 
			
		||||
      items: [
 | 
			
		||||
        'case-studies/jenkins-cicd'
 | 
			
		||||
        // 'case-studies/paas',
 | 
			
		||||
        //        'case-studies/workflow-edge-computing', // 待完成
 | 
			
		||||
        //        'case-studies/li-auto-inc', 暂时下掉,应该改写成一个 10 - 15 分钟体验的产品 lab 例子
 | 
			
		||||
        //        'case-studies/workflow-with-ocm',
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      type: 'category',
 | 
			
		||||
      label: 'Using KubeVela CLI',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue