Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tiller won't install #489

Closed
ljckennedy opened this issue May 19, 2019 · 14 comments
Closed

tiller won't install #489

ljckennedy opened this issue May 19, 2019 · 14 comments

Comments

@ljckennedy
Copy link

ljckennedy commented May 19, 2019

Describe the bug
I wish to use the helm client. My cluster is running and I can deploy Sc's and pods without helm and run get pods, , get storageclass, etc.

To Reproduce

echo 'Installing Kubernetes'
curl -sfL https://get.k3s.io | sh -
#alias kubectl='k3s kubectl'
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
kubectl get storageclass

curl -L https://git.io/get_helm.sh | bash
#Create tiller service account
kubectl -n kube-system create serviceaccount tiller
#Create cluster role binding for tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
#Initialize tiller
helm init --service-account tiller

Expected behavior
tiller installs

Screenshots

root@qmi-k3s:~# helm init --service-account tiller
$HELM_HOME has been configured at /root/.helm.
Error: error installing: Post http://localhost:8080/apis/extensions/v1beta1/namespaces/kube-system/deployments: dial tcp 127.0.0.1:8080: connect: connection refused
root@qmi-k3s:~#

`

Additional context
i tried disabling IP6 initially as I though this may be relevant.

@derba
Copy link

derba commented May 20, 2019

That is strange. You did exactly the same as me in #485. But tiller works for me fine. What OS do you use? And what is the output of kubectl get all -n kube-system -o wide?
Wherever I looked people suggest reinstalling tiller: helm/helm#3460. But the original issue has been fixed in helm.

@ljckennedy
Copy link
Author

I am using ubuntu 16.04. It's running inside a virtualbox VM (and all scripted via vagrant) but I can't see how they would impact.

Output is:

vagrant@qmi-k3s:~$ kubectl get all -n kube-system -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
pod/coredns-695688789-bdxn9 1/1 Running 2 29h 10.42.0.14 qmi-k3s
pod/helm-install-traefik-bgjv6 0/1 Completed 0 29h 10.42.0.4 qmi-k3s
pod/svclb-traefik-9642g 2/2 Running 4 29h 10.42.0.15 qmi-k3s
pod/traefik-55bd9646fc-7chf5 1/1 Running 2 29h 10.42.0.17 qmi-k3s

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
service/kube-dns ClusterIP 10.43.0.10 53/UDP,53/TCP,9153/TCP 29h k8s-app=kube-dns
service/traefik LoadBalancer 10.43.239.209 10.0.2.15 80:30365/TCP,443:30938/TCP 29h app=traefik,release=traefik

NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE CONTAINERS IMAGES SELECTOR
daemonset.apps/svclb-traefik 1 1 1 1 1 29h lb-port-80,lb-port-443 rancher/klipper-lb:v0.1.1,rancher/klipper-lb:v0.1.1 app=svclb-traefik

NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR
deployment.apps/coredns 1/1 1 1 29h coredns coredns/coredns:1.3.0 k8s-app=kube-dns
deployment.apps/traefik 1/1 1 1 29h traefik traefik:1.7.9 app=traefik,release=traefik

NAME DESIRED CURRENT READY AGE CONTAINERS IMAGES SELECTOR
replicaset.apps/coredns-695688789 1 1 1 29h coredns coredns/coredns:1.3.0 k8s-app=kube-dns,pod-template-hash=695688789
replicaset.apps/traefik-55bd9646fc 1 1 1 29h traefik traefik:1.7.9 app=traefik,pod-template-hash=55bd9646fc,release=traefik

NAME COMPLETIONS DURATION AGE CONTAINERS IMAGES SELECTOR
job.batch/helm-install-traefik 1/1 31s 29h helm rancher/klipper-helm:v0.1.5 controller-uid=78329809-79f1-11e9-8d7d-080027ee87c4
vagrant@qmi-k3s:~$

@derba
Copy link

derba commented May 20, 2019

It looks healthy. Does helm version print something usable?

@btashton
Copy link
Contributor

@ljckennedy I ran into this as well. You need to make sure that helm is using the correct kubeconfig. Try something like this:

KUBECONFIG=/etc/rancher/k3s/k3s.yaml helm init --service-account tiller

@ljckennedy
Copy link
Author

That did it ! Is it a bug that this is not set correctly on install? Can the docs be updated for this?

my output:
vagrant@qmi-k3s:~$ KUBECONFIG=/etc/rancher/k3s/k3s.yaml helm init --service-account tiller
Creating /home/vagrant/.helm
Creating /home/vagrant/.helm/repository
Creating /home/vagrant/.helm/repository/cache
Creating /home/vagrant/.helm/repository/local
Creating /home/vagrant/.helm/plugins
Creating /home/vagrant/.helm/starters
Creating /home/vagrant/.helm/cache/archive
Creating /home/vagrant/.helm/repository/repositories.yaml
Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com
Adding local repo with URL: http://127.0.0.1:8879/charts
$HELM_HOME has been configured at /home/vagrant/.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://docs.helm.sh/using_helm/#securing-your-helm-installation
vagrant@qmi-k3s:~$ kubectl get pods -n kube-system
NAME READY STATUS RESTARTS AGE
coredns-695688789-bdxn9 1/1 Running 2 39h
helm-install-traefik-bgjv6 0/1 Completed 0 39h
svclb-traefik-9642g 2/2 Running 4 39h
tiller-deploy-598f58dd45-qjkgh 0/1 Running 0 24s
traefik-55bd9646fc-7chf5 1/1 Running 2 39h
vagrant@qmi-k3s:~$ kubectl get pods -n kube-system
NAME READY STATUS RESTARTS AGE
coredns-695688789-bdxn9 1/1 Running 2 39h
helm-install-traefik-bgjv6 0/1 Completed 0 39h
svclb-traefik-9642g 2/2 Running 4 39h
tiller-deploy-598f58dd45-qjkgh 1/1 Running 0 30s
traefik-55bd9646fc-7chf5 1/1 Running 2 39h
vagrant@qmi-k3s:~$

@freakynit
Copy link

Solution by @btashton worked.

@hkmaly
Copy link

hkmaly commented Aug 6, 2019

Me too - I mean, I had the same problem and @btashton 's solution worked.

Who's bug it is, k3s or helm? Is there some config file this can be entered to or does it need to be added to environment manually?

@aaronleesmu
Copy link

This is about installing charts after @btashton's solution... with helm version:"v3.0.0-alpha.2".
Had to use this :
KUBECONFIG=/etc/rancher/k3s/k3s.yaml helm install stable/drupal --generate-name

@itninja-hue
Copy link

itninja-hue commented Sep 6, 2019

@ljckennedy
the error is due to missing/wrong config file in .kube folder .
Helm by default looks into that folder.

@aaronleesmu cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config
make sure you have the right permessions on the config file "755"

@Mohl
Copy link

Mohl commented Sep 30, 2019

@ljckennedy
the error is due to missing/wrong config file in .kube folder .
Helm by default looks into that folder.

@aaronleesmu cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config
make sure you have the right permessions on the config file "755"

Would
ln -s /etc/rancher/k3s/k3s.yaml $HOME/.kube/config not be the better solution? You'd have to recopy the file every time the k3s.yaml file changes - and you'd have to remember that...

@stodge
Copy link

stodge commented Dec 20, 2019

I don't know if this is related, and apologies if it's not:

HELM_HOME=/home/mike/.k3s_helm KUBECONFIG=/home/mike/.config/k3d/k3s-default/kubeconfig.yaml helm init --service-account tiller
Creating /home/mike/.k3s_helm 
Creating /home/mike/.k3s_helm/repository 
Creating /home/mike/.k3s_helm/repository/cache 
Creating /home/mike/.k3s_helm/repository/local 
Creating /home/mike/.k3s_helm/plugins 
Creating /home/mike/.k3s_helm/starters 
Creating /home/mike/.k3s_helm/cache/archive 
Creating /home/mike/.k3s_helm/repository/repositories.yaml 
Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com 
Adding local repo with URL: http://127.0.0.1:8879/charts 
$HELM_HOME has been configured at /home/mike/.k3s_helm.
Error: error installing: the server could not find the requested resource

@irizzant
Copy link

Same is here, using the instructions reported here https://medium.com/better-programming/using-a-k3s-kubernetes-cluster-for-your-gitlab-project-b0b035c291a9

+ helm init --tiller-tls --tiller-tls-verify --tls-ca-cert /data/helm/helm/config/ca.pem --tiller-tls-cert /data/helm/helm/config/cert.pem --tiller-tls-key /data/helm/helm/config/key.pem --service-account tiller
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://kubernetes-charts.storage.googleapis.com 
Adding local repo with URL: http://127.0.0.1:8879/charts 
$HELM_HOME has been configured at /root/.helm.
Error: error installing: the server could not find the requested resource

@stodge
Copy link

stodge commented Jan 28, 2020

I had to install a newer version (v2.16.1) of Helm. I was using 2.14.x.

@brandond
Copy link
Contributor

brandond commented Dec 5, 2020

Closing due to age. Helm v2 is EOL.

@brandond brandond closed this as completed Dec 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests