install
描述
在您的 Kubernetes 叢集中安裝 DirectPV。
語法
kubectl directpv install [flags]
參數
旗標
旗標 | 描述 |
---|---|
--apparmor-profile <字串> |
AppArmor 設定檔的路徑 |
--image <字串> |
DirectPV 映像檔的名稱 (預設為 directpv:4.0.6 ) |
--image-pull-secrets <字串> |
DirectPV 映像檔的映像檔提取密碼 (SECRET1, ..) |
--kube-version <字串> |
用於產生資訊清單的 Kubernetes 版本 (預設為 "1.27.0") |
--legacy |
啟用舊版模式 (搭配 '-o' 使用) |
--node-selector <字串> |
使用標籤選取儲存節點 (KEY=VALUE, ..) |
-o , --output <字串> |
產生安裝資訊清單。將格式指定為 yaml 或 json |
--openshift |
使用 OpenShift 特定的安裝 |
--org <字串> |
登錄檔中的組織名稱 (預設為 minio ) |
--registry <字串> |
容器登錄檔的名稱 (預設為 "quay.io") |
--seccomp-profile <字串> |
Seccomp 設定檔的路徑 |
--tolerations <字串> |
在儲存節點上設定容忍度標籤 (KEY[=VALUE]:EFFECT, ..) |
全域旗標
您可以使用以下全域 DirectPV 旗標搭配 kubectl directpv install
旗標 | 描述 |
---|---|
--kubeconfig <字串> |
用於 CLI 請求的 kube.config 檔案路徑 |
--quiet |
抑制列印錯誤訊息 |
範例
安裝 DirectPV
以下命令會安裝 DirectPV,並使用所有預設選項。
kubectl directpv install
從私人登錄檔安裝 DirectPV
以下命令會使用來自 private-registry.io
私人登錄檔,針對 my-org-name
組織的映像檔來安裝 DirectPV。
kubectl directpv install --registry private-registry.io --org my-org-name
在選取的節點上部署 DirectPV Pod
以下命令只會在指定節點上的 Pod 中部署 DirectPV daemonset。
kubectl directpv install --node-selector node-label-key=node-label-value
將 node-label-key
替換為用作選擇器的標籤鍵。將 node-label-value
替換為您要安裝 DirectPV 的節點上該鍵的值。
使用容忍度控制 DirectPV Pod 的放置
以下命令使用容忍度來限制 DirectPV 的安裝位置。容忍度的格式為 key=value:effect
。
kubectl directpv install --tolerations key=value:NoSchedule
產生 DirectPV 安裝清單檔案
以下命令會產生一個 YAML 清單檔案,可用於安裝 DirectPV。
kubectl directpv install -o yaml > directpv-install.yaml
使用 AppArmor 設定檔安裝 DirectPV
以下命令使用 AppArmor 設定檔安裝 DirectPV。
kubectl directpv install --apparmor-profile directpv
使用 seccomp 設定檔安裝 DirectPV
以下命令使用 seccomp 設定檔安裝 DirectPV。
kubectl directpv install --seccomp-profile profiles/seccomp.json