Can't do Helm Init : tiller not found

9/30/2019

I'm trying to install Traefik on a Ubuntu 18.10 master on my cluster using Helm.

I'm able to install Helm with snap snap install helm --classic but then when I want to install Tiller with the helm init command, I have the following output :

helm init                                                                                         
Creating /home/user/.helm                                                                                            
Creating /home/user/.helm/repository                                                                                 
Creating /home/user/.helm/repository/cache                                                                           
Creating /home/user/.helm/repository/local                                                                           
Creating /home/user/.helm/plugins                                                                                    
Creating /home/user/.helm/starters                                                                                   
Creating /home/user/.helm/cache/archive                                                                              
Creating /home/user/.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/user/.helm.                                                                  
Error: error installing: the server could not find the requested resource  

I've tried to install helm through the binaries from the official GitHub, it ends with the same error.

I've also tried to install Tiller manually by running :

helm init --dry-run --debug >> tiller.yml

But when I do kubectl apply -f tiller.yml, it says that it couldn't find extensions/v1beta1.

I'm running out of solutions so I'm asking for your help if you have any ideas !

---                                                                                                                      
apiVersion: extensions/v1beta1                                                                                           
kind: Deployment                                                                                                         
metadata:                                                                                                                
  creationTimestamp: null                                                                                                
  labels:                                                                                                                
    app: helm                                                                                                            
    name: tiller                                                                                                         
  name: tiller-deploy                                                                                                    
  namespace: kube-system  
spec:                                                                                                                    
  replicas: 1                                                                                                            
  strategy: {}                                                                                                           
  template:                                                                                                              
    metadata:                                                                                                            
      creationTimestamp: null                                                                                            
      labels:                                                                                                            
        app: helm                                                                                                        
        name: tiller                                                                                                     
    spec:                                                                                                                
      automountServiceAccountToken: true                                                                                 
      containers:                                                                                                        
      - env:                                                                                                             
        - name: TILLER_NAMESPACE                                                                                         
          value: kube-system                                                                                             
        - name: TILLER_HISTORY_MAX                                                                                       
          value: "0"                                                                                                     
        image: gcr.io/kubernetes-helm/tiller:v2.14.3                                                                     
        imagePullPolicy: IfNotPresent                                                                                    
        livenessProbe:                                                                                                   
          httpGet:
          httpGet:                                                                                                       
            path: /liveness                                                                                              
            port: 44135                                                                                                  
          initialDelaySeconds: 1                                                                                         
          timeoutSeconds: 1                                                                                              
        name: tiller                                                                                                     
        ports:                                                                                                           
        - containerPort: 44134                                                                                           
          name: tiller                                                                                                   
        - containerPort: 44135                                                                                           
          name: http                                                                                                     
        readinessProbe:                                                                                                  
          httpGet:                                                                                                       
            path: /readiness                                                                                             
            port: 44135                                                                                                  
          initialDelaySeconds: 1                                                                                         
          timeoutSeconds: 1                                                                                              
        resources: {}                                                                                                    
status: {}

---                                                                                                                      
apiVersion: v1                                                                                                           
kind: Service                                                                                                            
metadata:                                                                                                                
  creationTimestamp: null                                                                                                
  labels:                                                                                                                
    app: helm                                                                                                            
    name: tiller                                                                                                         
  name: tiller-deploy                                                                                                    
  namespace: kube-system                                                                                                 
spec:                                                                                                                    
  ports:                                                                                                                 
  - name: tiller                                                                                                         
    port: 44134                                                                                                          
    targetPort: tiller                                                                                                   
  selector:                                                                                                              
    app: helm                                                                                                            
    name: tiller                                                                                                         
  type: ClusterIP                                                                                                        
status:                                                                                                                  
  loadBalancer: {}                                                                                                       

...        
-- Ryctus
kubernetes
kubernetes-helm

2 Answers

9/30/2019

If it is k8s version 1.16, there is link to my answer in another question with the same error. – jt97

The comment of jt97 was the perfect workaround, thanks !

-- Ryctus
Source: StackOverflow

9/30/2019

Workaround, using command:

helm init --service-account tiller --output yaml | sed 's@apiVersion: extensions/v1beta1@apiVersion: apps/v1@' | sed 's@ replicas: 1@ replicas: 1\n selector: {"matchLabels": {"app": "helm", "name": "tiller"}}@' | kubectl apply -f -

If k8s version is : 1.16, you should downgrade to 1.14.

-- Thanh Nguyen Van
Source: StackOverflow