K8S部署helm 風清揚的Linux工作室

2022-09-23 04:15:09 字數 1927 閱讀 5978

參考:

需要映象

gcr.io/kubernetes-helm/tiller:v2.7.0重新命名乙個tag

docker?pull?xsllqs/kubernetes-helm:v2.7.0

docker?tag?xsllqs/kubernetes-helm:v2.7.0?gcr.io/kubernetes-helm/tiller:v2.7.0上傳到私有倉庫

docker?tag?xsllqs/kubernetes-helm:v2.7.0?172.19.2.139/xsllqs/kubernetes-helm/tiller:v2.7.0

docker?push?172.19.2.139/xsllqs/kubernetes-helm/tiller:v2.7.0每個node都**並重命名該節點

docker?pull?172.19.2.139/xsllqs/kubernetes-helm/tiller:v2.7.0

docker?tag?172.19.2.139/xsllqs/kubernetes-helm/tiller:v2.7.0?gcr.io/kubernetes-helm/tiller:v2.7.0修改環境變數

vim?/etc/bashrc

export?path="$path:/usr/local/bin"

vim?/etc/profile

export?path="$path:/usr/local/bin"

source?/etc/profilerbac授權

kubectl?create?serviceaccount?--namespace?kube-system?tiller

kubectl?create?clusterrolebinding?tiller-cluster-rule?--clusterrole=cluster-admin?--serviceaccount=kube-system:tiller

kubectl?patch?deploy?--namespace?kube-system?tiller-deploy?-p?'}}}'部署

cd?/opt/helm

curl?>?get_helm.sh

chmod?700?get_helm.sh

./get_helm.sh

helm?init?--tiller-namespace=kube-system檢視tiller是否安裝成功

kubectl?get?pods?--namespace?kube-system測試client和server是否連線正常

helm?version解除安裝

kubectl?delete?deployment?tiller-deploy?--namespace?kube-systemweb-ui安裝(本人未部署)

helm?install?stable/nginx-ingress

helm?install?stable/nginx-ingress?--set?controller.hostnetwork=true

helm?repo?add?monocular?

helm?install?monocular/monocular新增國內可用倉庫

helm?repo?add?opsgoodness?安裝redis應用

helm?install?stable/redis-ha?--version?0.2.3如果上面執行不了就直接執行以下內容

helm?install?訪問redis

redis-cli?-h?torrid-tuatara-redis-ha.default.svc.cluster.local安裝kafka應用

helm?repo?add?incubator?

helm?install?incubator/kafka?--version?0.2.1或者

helm?install?/kafka-0.2.1.tgz刪除部署的應用

helm?ls

helm?delete?

K8s部署prometheus監控K8s細節

prometheus 一些配置檔案可以再github上找到。部署 root kube prometheus manifests 目錄下所有檔案 部署 root kube prometheus manifests setup 目錄下所有檔案 要注意的是自己要建立乙個工作空間 如果報錯執行下面語句 部署...

k8s集群部署 docker部署k8s安裝篇

1 安裝docker 緊接著配置乙個穩定 stable 的倉庫 倉庫配置會儲存到 etc yum.repos.d docker ce.repo檔案中 yum config manager add repo 更新yum安裝的相關docke軟體包 安裝docker ce yum update y yum...

單機部署k8s

安裝docker ce systemctl enable docker systemctl start docker 修改cgroup driver 為systemd 預設為cgroups echo kubelet kubeadm extra args cgroup driver systemd e...