Version: v1.0
快速开始
欢迎来到 KubeVela! 在本向导中, 我们会向你介绍如何安装 KubeVela 并且部署你的第一个简单的应用。
Step 1: 安装
在此之前,请确保你已经完成了安装步骤并且验证了安装成功,参考安装文档.
Step 2: 部署你的第一个应用
$ kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/master/docs/examples/vela-app.yamlapplication.core.oam.dev/first-vela-app created
检查状态:直到看到 status 是 running,并且services 是 healthy
$ kubectl get application first-vela-app -o yamlapiVersion: core.oam.dev/v1beta1kind: Applicationmetadata:generation: 1name: first-vela-app...namespace: defaultspec:components:- name: express-servertype: webserviceproperties:image: crccheck/hello-worldport: 8000traits:- type: ingressproperties:domain: testsvc.example.comhttp:/: 8000status:...services:- healthy: truename: express-servertraits:- healthy: truemessage: 'Visiting URL: testsvc.example.com, IP: your ip address'type: ingressstatus: running
在底层, K8s资源被创建了出来:
$ kubectl get deploymentNAME READY UP-TO-DATE AVAILABLE AGEexpress-server-v1 1/1 1 1 8m$ kubectl get svcNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEexpress-server ClusterIP 172.21.11.152 <none> 8000/TCP 7m43skubernetes ClusterIP 172.21.0.1 <none> 443/TCP 116d$ kubectl get ingressNAME CLASS HOSTS ADDRESS PORTS AGEexpress-server <none> testsvc.example.com <your ip address> 80 7m47s
如果你的集群有一个工作中的 ingress,你可以查看这个 service。
$ curl -H "Host:testsvc.example.com" http://<your ip address>/<xmp>Hello World## .## ## ## ==## ## ## ## ## ===/""""""""""""""""\___/ ===~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~\______ o _,/\ \ _,'`'--.._\..--''</xmp>
太棒了! 你已经全都部署成功了。
下一步?
以下是一些推荐的后续步骤:
- 从核心概念开始学习 KubeVela
- 了解更多
Application的细节并且理解其是如何工作的。 - 加入CNCF Slack 中的
#kubevelachannel 和 Gitter - 加入 KubeVela 中文社区钉钉群。钉钉群号:23310022。
Welcome onboard and sail Vela!