3.5.3.4. 互动创建
您还可以以互动方式运行 odo create
命令,以引导您按照创建组件所需的步骤进行指导:
$ odo create
? Which devfile component type do you wish to create go
? What do you wish to name the new devfile component go-api
? What project do you want the devfile component to be created in default
Devfile Object Validation
✓ Checking devfile existence [164258ns]
✓ Creating a devfile component from registry: DefaultDevfileRegistry [246051ns]
Validation
✓ Validating if devfile name is correct [92255ns]
? Do you want to download a starter project Yes
Starter Project
✓ Downloading starter project go-starter from https://github.com/devfile-samples/devfile-stack-go.git [429ms]
Please use odo push
command to create the component with source deployed
系统将提示您选择组件类型、名称和项目。您还可以选择是否下载初学者项目。完成后,在工作目录中创建一个新的 devfile.yaml
文件。
要将这些资源部署到集群中,请运行 odo push
命令。