k8s1.14-helm私库

安装库

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
mkdir helm-repo
nohup helm serve --address 0.0.0.0:8879 --repo-path /root/sy/helm-repo &
cp -r mychart helm-repo/
cd helm-repo/
helm package mychart --save=false --dependency-update
rm -rf mychart
helm repo index --url=http://192.168.7.101:8879 .
helm repo update
helm repo add local-101 http://192.168.7.101:8879


[root@master101 helm-repo]# helm repo list
NAME URL
local http://127.0.0.1:8879/charts
stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
local-101 http://192.168.7.101:8879


[root@master101 helm-repo]# helm search local-101/
NAME CHART VERSION APP VERSION DESCRIPTION
local-101/mychart 0.1.0 1.0 A Helm chart for Kubernetes

安装Kubeapps

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
helm repo add bitnami https://charts.bitnami.com/bitnami


helm install --name kubeapps --namespace kubeapps bitnami/kubeapps


kubectl create serviceaccount kubeapps-operator


kubectl create clusterrolebinding kubeapps-operator --clusterrole=cluster-admin --serviceaccount=default:kubeapps-operator



[root@master101 helm-repo]# kubectl get secret $(kubectl get serviceaccount kubeapps-operator -o jsonpath='{.secrets[].name}') -o jsonpath='{.data.token}' | base64 --decode
eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJkZWZhdWx0Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZWNyZXQubmFtZSI6Imt1YmVhcHBzLW9wZXJhdG9yLXRva2VuLTZzcGQ4Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6Imt1YmVhcHBzLW9wZXJhdG9yIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQudWlkIjoiODZjYTI0YzAtMjgzYi00YTg1LTkzMTktMTcyZWY3NTlhZGU3Iiwic3ViIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50OmRlZmF1bHQ6a3ViZWFwcHMtb3BlcmF0b3IifQ.OUTbiPwtnJuVdKPAtgSORyox2GYDgwnRunIz37arSCHSSSkHz_BgJgut8Pr8Ava7BQljPlG_w5htGh-KYTahg5uBPpYKZvjBa5QG_VC-czDRX37YKY_xbg0sdgp-4VurgIyn5CBbecBktXem014-2pR97QuI3EmN8JhKCokBaU46LlSpcbFMEOhFgpBklLrZ4ssDYtvYLlnk3dwJ6Fr32-UDUqyRlLdv5rWTkA0BVwF63gvNuykneMoOYuIqPL8p9rGMMAG6M-O9FRwQUbq4sUtaStW54h545_VtXOFlrClZ5l0M-7VPPc7ceOMXlU08tWWjMw4DfZO1bf8ylrpfXg



export POD_NAME=$(kubectl get pods -n kubeapps -l "app=kubeapps,release=kubeapps" -o jsonpath="{.items[0].metadata.name}")

kubectl port-forward -n kubeapps $POD_NAME --address=192.168.7.101 8080:8080

访问

添加上面建的本地chat

Donate