[k8s系列篇之3] 用helm/charts部署应用
前言
最近在研究几个k8s应用, 都是charts部署的, 有必要记录一下步骤
步骤
安装helm
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
[root@node1 ~]# curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 11156 100 11156 0 0 4093 0 0:00:02 0:00:02 --:--:-- 4093
Downloading https://get.helm.sh/helm-v3.10.1-linux-amd64.tar.gz
Verifying checksum... Done.
Preparing to install helm into /usr/local/bin
helm installed into /usr/local/bin/helm
部署应用 neuvector
helm repo add neuvector https://neuvector.github.io/neuvector-helm/
helm search repo neuvector/core
kubectl create namespace neuvector
helm install my-release --namespace neuvector neuvector/core
[root@node1 ~]# helm repo add neuvector https://neuvector.github.io/neuvector-helm/
"neuvector" has been added to your repositories
[root@node1 ~]#
[root@node1 ~]# helm search repo neuvector/core
NAME CHART VERSION APP VERSION DESCRIPTION
neuvector/core 2.2.3 5.0.3 Helm chart for NeuVector's core services
[root@node1 ~]# kubectl create namespace neuvector
Error from server (AlreadyExists): namespaces "neuvector" already exists
[root@node1 ~]# helm install my-release --namespace neuvector neuvector/core
NAME: my-release
LAST DEPLOYED: Thu Oct 13 06:52:34 2022
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
[root@node1 ~]# NODE_PORT=$(kubectl get --namespace neuvector -o jsonpath="{.spec.ports[0].nodePort}" services neuvector-service-webui)
[root@node1 ~]# NODE_IP=$(kubectl get nodes --namespace neuvector -o jsonpath="{.items[0].status.addresses[0].address}")
[root@node1 ~]# echo https://$NODE_IP:$NODE_PORT
https://10.1.3.51:31190
访问
访问 https://10.1.3.51:31190 即可
Member discussion