--- title: 'NET Conf 2020 - Lab-3' disqus: hackmd --- .NET Conf 2020 - Lab-3 === ## Source-2-Image,使用 Command Line >1. 安裝 .net image stream ``` oc create -f https://raw.githubusercontent.com/redhat-developer/s2i-dotnetcore/master/dotnet_imagestreams.json ``` >2. 以 oc command 部署應用 ``` oc new-app --name=example-app 'dotnet:5.0-ubi8~https://github.com/redhat-developer/s2i-dotnetcore-ex#dotnet-5.0' --build-env DOTNET_STARTUP_PROJECT=app ``` >3. 查看 Build Config ``` oc logs -f bc/example-app ``` >4. 查看 Deployment Config ``` oc logs -f dc/example-app ``` >5. 對外開放 ``` oc expose svc/example-app ``` >6. 確定對外服務路由 ``` oc get route/example-app ``` >7. 查看頁面 >8. 查看應用相關資訊 ```gherkin= oc get all -o name ``` >9.查看路由資訊 ```gherkin= oc describe route/example-app ``` >10.查看相關 label 資訊 ```gherkin= oc get all --selector app=example-app -o name ``` >11.刪除應用相關資源 ```gherkin= oc delete all --selector app=example-app ``` >12.確認是否刪除完畢 ```gherkin= oc get all -o name ``` ###### tags: `Event` `.NET Conf 2020`