部分内容参考 https://blog.csdn.net/bbwangj/article/details/
下载helm
https://get.helm.sh/helm-v2.14.1-linux-amd64.tar.gz
上传至 centos 虚拟机 解压
mv helm-v2.14.1-linux-amd64.tar.gz
移动至bin目录
mv linux-amd64/helm /usr/local/bin/helm
helm 命令可用 删除线忽略,参考后面的安装方式
换helm镜像到阿里云
helm init –client-only –stable-repo-url https://aliacs-app-catalog.oss-cn-hangzhou.aliyuncs.com/charts/
helm repo add incubator https://aliacs-app-catalog.oss-cn-hangzhou.aliyuncs.com/charts-incubator/
helm repo update
安装Tiller
helm init
kubectl get pods -n kube-system|grep tiller
卸载使用 helm reset
查询 charts
helm search
更换仓库
# 先移除原先的仓库
helm repo remove stable
# 添加新的仓库地址
helm repo add stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
# 更新仓库
helm repo update
使用下面的命令提醒不接受参数
准备使用docker直接安装的时候再次尝试了一下, 去掉了 –upgrade, 居然安装成功
helm init –service-account tiller -i registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.14.1 –stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
重要的一步, 给tiller授权 , 第一次安装的时候是按最上面的教程来的,所以一切很顺利,也没有记录授权这块内容, 但是当重新回来重新安装的时候,少了这一步,导致容器组创建失败
报错
"conditions": [ { "type": "ReplicaFailure", "status": "True", "lastTransitionTime": "2019-06-26T08:07:25Z", "reason": "FailedCreate", "message": "pods \"tiller-deploy-767d9fb945-\" is forbidden: error looking up service account kube-system/tiller: serviceaccount \"tiller\" not found" } ]
授权命令
kubectl create serviceaccount --namespace kube-system tiller kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller 给tiller设置账号 kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}' 检查是否授权成功 kubectl get deploy --namespace kube-system tiller-deploy --output yaml|grep serviceAccount
授权完成后, tiller就可以使用了.
单独安装tiller
helm init –service-account tiller –upgrade -i 192.168.106.55:8081/google_containers/tiller:v2.14.1
暴露服务
kubectl expose deployment tiller-deploy -n kube-system --port=44134 --target-port=44134 --external-ip=192.168.106.56
安装 nginx 注意 true后面的逗号不能写错
helm install stable/nginx-ingress –set controller.hostNetwork=true,rbac.create=true
nginx-ingress-controller 一直处理pending状态 但是不影响使用
curl http://192.168.220.129:32526/healthz 获取200的响应, 其它请求获取 404
这说明安装成功了
安装 monocular
helm repo add monocular https://helm.github.io/monocular helm install --name monocular monocular/monocular
安装后一直不知道怎么使用, 接着搞
主要是不理解nginx-ingress 与 monocular如何对接的, 另外 nginx-ingress-controller 一直处理pending状态
还需要仔细理解一下
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/211670.html原文链接:https://javaforall.net
