--- title: Kubectl create # 簡報的名稱 tags: K8s # 簡報的標籤 --- # kubectl create > [name=李俊毅] > [time=Wed, Apr 8, 2020 11:09 AM] --- ## Agenda * 什麼是 Kubectl create * Kubectl create 語法 * Kubectl create 範例 * 其他指令說明 --- ## 什麼是 kubectl create 可透過標準輸入或是文件新創建 --- ## Kubectl create 語法 ``` kubectl create -f FILENAME [options] ``` --- ## Kubectl create 範例 ---- ### 透過 deploy 啟動 nginx ``` kubectl create deploy nginx --image=nginx:latest ``` ---- ### 透過 service 將 nginx 服務 Port 對外 ``` kubectl create service nodeport nginx --tcp=80:80 ``` --- ## [其他指令參考](https://kubernetes.kansea.com/docs/user-guide/kubectl/kubectl_run/)