# Tanzu 2.5 + NeuVector 5.4.X 安裝流程 ## 1. 重點注意 Tanzu版本:2.5, K8s 1.29, NeuVector 5.4.1 :::warning 需要先確認socket位置,否則enforcer會因為認不到socket導致錯誤。 ::: TKG的container runtime socket位置: ```shell= /run/containerd/containerd.sock ``` :::info 無法連線問題大部分都跟網路有關,請留意防火牆相關設定。 ::: ## 2. 下載charts與建立values file. :::warning 盡可能使用最新版本。 ::: ```shell= helm repo add neuvector https://neuvector.github.io/neuvector-helm/ helm search repo neuvector/core -l helm show values neuvector/core --version 2.8.3 > neuvector-values.yaml helm fetch neuvector/core --version 2.8.3 # ll total 17004 -rw------- 1 root root 1314 Jul 14 18:59 .bash_history drwxr-xr-x 1 root root 8 Jul 14 18:57 .cache drwx------ 1 root root 20 Jul 14 18:57 .config drwx------ 1 root root 0 Mar 15 2022 .gnupg drwxr-xr-x 1 root root 22 Jul 14 17:28 .kube drwx------ 1 root root 0 Jul 1 2024 .ssh -rw------- 1 root root 1088 Jul 14 17:04 .viminfo drwxr-xr-x 1 root root 0 Mar 15 2022 bin -rw-r--r-- 1 root root 33311 Jul 16 09:33 core-2.8.3.tgz -rw-r--r-- 1 root root 17344287 Dec 17 2024 helm-v3.16.4-linux-amd64.tar.gz drwxr-xr-x 1 root root 56 Jul 1 2024 inst-sys drwxr-xr-x 1 1001 128 40 Dec 17 2024 linux-amd64 -rw-r--r-- 1 root root 16832 Jul 16 09:32 neuvector-values.yaml ``` ## 3. 修改values file內容 ```shell= # vim neuvector-values.yaml ``` :::warning 1. 需要修改runtimePath: /run/containerd/containerd.sock 2. 請修改registry位置,指向客戶內部的registry位置。 3. 修改replicas數量。 4. 有需要可以修改對外service為NodePort + 指定Port ::: ## 4. 安裝NeuVector ```shell= # kubectl create ns neuvector namespace/neuvector created # helm install neuvector -n neuvector ./core-2.8.3.tgz -f neuvector-values.yaml NAME: neuvector LAST DEPLOYED: Wed Jul 16 09:39:23 2025 NAMESPACE: neuvector STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: Get the NeuVector URL by running these commands: NODE_PORT=$(kubectl get --namespace neuvector -o jsonpath="{.spec.ports[0].nodePort}" services neuvector-service-webui) NODE_IP=$(kubectl get nodes --namespace neuvector -o jsonpath="{.items[0].status.addresses[0].address}") echo https://$NODE_IP:$NODE_PORT ``` ## 5. 其他參考資料 [官方資料](https://open-docs.neuvector.com/deploying/kubernetes)