a package management on k8s
Kubneretes 系列教材 A.1 v1.0
➜ helm list -q | xargs helm delete
release "hissing-worm" deleted
release "historical-wolf" deleted
release "masked-woodpecker" deleted
release "named-condor" deleted
release "viable-ladybird" deleted
release "wanton-bison" deleted
用來搜尋有哪些工具軟體可以利用 helm 來安裝
➜ helm search beat
NAME CHART VERSION APP VERSION DESCRIPTION
stable/auditbeat 1.1.0 6.7.0 A lightweight shipper to audit the activities of users an...
stable/filebeat 3.1.0 7.0.1 A Helm chart to collect Kubernetes logs with filebeat
stable/heartbeat 1.2.0 6.7.0 A Helm chart to periodically check the status of your ser...
stable/metricbeat 1.7.0 6.7.0 A Helm chart to collect Kubernetes logs with metricbeat
stable/dmarc2logstash 1.2.0 1.0.3 Provides a POP3-polled DMARC XML report injector into
用來將軟體或工具的 chart 更新到 k8s
➜ helm install --name keycloak stable/keycloak --tiller-
namespace tiller-world --namespace tiller-world
NAME: keycloak
LAST DEPLOYED: Sat Oct 12 02:04:10 2019
NAMESPACE: tiller-world
STATUS: DEPLOYED
➜ export POD_NAME=$(kubectl get pods --namespace tiller-world -l app=keycloak,release=keycloak -o jsonpath="{.items[0].metadata.name}")
➜ echo "Visit http://127.0.0.1:8080 to use Keycloak"
➜ kubectl port-forward --namespace tiller-world $POD_NAME 8080
➜ ngrok http 8080
Forwarding https://016c0276.ngrok.io -> http://localhost:8080
➜ export POD_NAME=$(kubectl get pods --namespace tiller-world -l app=keycloak,release=keycloak -o jsonpath="{.items[0].metadata.name}")
➜ echo "Visit http://<public IP>:8003 to use Keycloak"
➜ kubectl port-forward --namespace tiller-world $POD_NAME
➜ ngrok http 8080
Forwarding https://016c0276.ngrok.io -> http://localhost:8080
8003:8080 --address 0.0.0.0
用來列出 k8s 上已經用 helm 安裝的軟體
➜ helm list -q --tiller-namespace tiller-world
keycloak
➜ helm list --tiller-namespace tiller-world
NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE
keycloak 1 Sat Oct 12 02:04:10 2019 DEPLOYED keycloak-4.10.1 5.0.0 tiller-world
用來刪除 k8s 上已安裝的軟體
➜ helm --tiller-namespace tiller-world del --purge keycloak
release "keycloak" deleted
用來列出 local 所有 chart repos URL 的清單
➜ helm repo list
NAME URL
stable https://kubernetes-charts.storage.googleapis.com
local http://127.0.0.1:8879/charts
codecentric https://codecentric.github.io/helm-charts
gabibbo97 https://gabibbo97.github.io/charts/
用來增加一個新的 chart repo 的參考 URL
➜ helm repo add gabibbo97 https://gabibbo97.github.io/charts/
"gabibbo97" has been added to your repositories
用來更新參考的 chart repos
➜ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Skip local chart repository
...Successfully got an update from the "codecentric" chart repository
...Successfully got an update from the "gabibbo97" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete.
用來刪除 local 某一個 chart repo 的 URL
➜ helm repo remove codecentric
"codecentric" has been removed from your repositories
還有其他 help repo 副指令: remove, list, index
Usage:
helm repo [command]
Available Commands:
add add a chart repository
index generate an index file given a directory containing packaged charts
list list chart repositories
remove remove a chart repository
update update information of available charts locally from chart repositories
helm init
helm version
helm repo list
helm repo add
helm repo update
helm repo remove
helm search
helm install
helm list
helm delete
helm upgrade
helm 指令的一些選項
-f, --values
--set
--name
--version