【发布时间】:2021-12-31 23:57:57
【问题描述】:
在helm2 init之前,我跑过:
kubectl delete all --all -n tiller-ns
rm -rf -- ~/.helm
然后我运行这个:
helm2 init --tiller-namespace tiller-ns --stable-repo-url https://charts.helm.sh/stable
出来:
Creating /root/.helm
Creating /root/.helm/repository
Creating /root/.helm/repository/cache
Creating /root/.helm/repository/local
Creating /root/.helm/plugins
Creating /root/.helm/starters
Creating /root/.helm/cache/archive
Creating /root/.helm/repository/repositories.yaml
Adding stable repo with URL: https://charts.helm.sh/stable
Adding local repo with URL: http://127.0.0.1:8879/charts
$HELM_HOME has been configured at /root/.helm.
Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster.
Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy.
To prevent this, run `helm init` with the --tiller-tls-verify flag.
For more information on securing your installation see: https://v2.helm.sh/docs/securing_installation/
然后,检查它:
helm2 version
出来:
Client: &version.Version{SemVer:"v2.16.12", GitCommit:"47f0b88409e71fd9ca272abc7cd762a56a1c613e", GitTreeState:"clean"}
Error: could not find tiller
查看舵柄:
kubectl get all -n tiller-ns
出来:
NAME READY STATUS RESTARTS AGE
pod/tiller-deploy-86b4fc48c9-x6tk9 1/1 Running 0 2m24s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/tiller-deploy ClusterIP 10.107.83.126 <none> 44134/TCP 2m24s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/tiller-deploy 1/1 1 1 2m24s
NAME DESIRED CURRENT READY AGE
replicaset.apps/tiller-deploy-86b4fc48c9 1 1 1 2m24s
describe 怎么样?:
kubectl describe po tiller-deploy-86b4fc48c9-x6tk9 -n tiller-ns
出来:
Name: tiller-deploy-86b4fc48c9-x6tk9
Namespace: tiller-ns
Priority: 0
Node: node-04/192.168.3.144
Start Time: Mon, 22 Nov 2021 18:57:44 +0800
Labels: app=helm
name=tiller
pod-template-hash=86b4fc48c9
Annotations: cni.projectcalico.org/podIP: 100.103.62.181/32
cni.projectcalico.org/podIPs: 100.103.62.181/32
Status: Running
IP: 100.103.62.181
IPs:
IP: 100.103.62.181
Controlled By: ReplicaSet/tiller-deploy-86b4fc48c9
Containers:
tiller:
Container ID: docker://2eaac0dfcea9a77a591b0c612549265a59df126c855f65089e1ba3402305b518
Image: gcr.io/kubernetes-helm/tiller:v2.16.12
Image ID: docker://sha256:c11838703bf83ca52d95fe66b0db8d6a8797581fdd132925c27cbc9a70e1d9e1
Ports: 44134/TCP, 44135/TCP
Host Ports: 0/TCP, 0/TCP
State: Running
Started: Mon, 22 Nov 2021 18:57:48 +0800
Ready: True
Restart Count: 0
Liveness: http-get http://:44135/liveness delay=1s timeout=1s period=10s #success=1 #failure=3
Readiness: http-get http://:44135/readiness delay=1s timeout=1s period=10s #success=1 #failure=3
Environment:
TILLER_NAMESPACE: tiller-ns
TILLER_HISTORY_MAX: 0
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-cppv9 (ro)
Conditions:
Type Status
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
default-token-cppv9:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-cppv9
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 3m18s default-scheduler Successfully assigned tiller-ns/tiller-deploy-86b4fc48c9-x6tk9 to node-04
Normal Pulled 3m14s kubelet Container image "gcr.io/kubernetes-helm/tiller:v2.16.12" already present on machine
Normal Created 3m14s kubelet Created container tiller
Normal Started 3m13s kubelet Started container tiller
还有logs?
kubectl logs tiller-deploy-86b4fc48c9-x6tk9 -n tiller-ns
出来:
[main] 2021/11/22 10:57:49 Starting Tiller v2.16.12 (tls=false)
[main] 2021/11/22 10:57:49 GRPC listening on :44134
[main] 2021/11/22 10:57:49 Probes listening on :44135
[main] 2021/11/22 10:57:49 Storage driver is ConfigMap
[main] 2021/11/22 10:57:49 Max history per release is 0
然后我再次运行:
helm2 version
出来:
Client: &version.Version{SemVer:"v2.16.12", GitCommit:"47f0b88409e71fd9ca272abc7cd762a56a1c613e", GitTreeState:"clean"}
Error: could not find tiller
什么鬼??
【问题讨论】:
标签: kubernetes-helm