Installing Helm 2.9 on mac osx and Tiller

1/7/2020

I'm trying to install older version of helm and tiller on minikube locally and keep on getting the Error: error installing: the server could not find the requested resource erorr message - no clue on how else to approach the problem;

Steps I did:

$ brew unlink kubernetes-helm
$ brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/78d64252f30a12b6f4b3ce29686ab5e262eea812/Formula/kubernetes-helm.rb
$ brew switch kubernetes-helm 2.9.1
  • Other than that just: minikube start
  • Set kubectl to use minikube: kubectl config set-context minikube
  • Change docker to run/download images on minikube: eval $(minikube docker-env)

The error message i get is:

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

** Update

This bug report helps a little but issues still exists: https://github.com/helm/helm/issues/6374

current workaround seems to be something like this:

helm init --output yaml > tiller.yaml and update the tiller.yaml:

change to apps/v1 add the selector field

---
apiVersion: apps/v1
kind: Deployment
metadata:
  creationTimestamp: null
  labels:
    app: helm
    name: tiller
  name: tiller-deploy
  namespace: kube-system
spec:
  replicas: 1
  strategy: {}
  selector:
    matchLabels:
      app: helm
      name: tiller

and:

  • kubectl apply -f tiller.yaml
  • helm init --service-account tiller --override spec.selector.matchLabels.'name'='tiller',spec.selector.matchLabels.'app'='helm' --output yaml | sed 's@apiVersion: extensions/v1beta1@apiVersion: apps/v1@' | kubectl apply -f -

Resolved:

And these steps helped me in the end, which I suggest to everyone who want to use older versions of helm

# 1. Check which binary you would like: https://github.com/helm/helm/releases and copy address
wget -c https://get.helm.sh/helm-v3.0.2-darwin-amd64.tar.gz
tar -zxvf helm-v3.0.2-darwin-amd64.tar.gz
rm -rf ~/.helm
mv <directory_of_download>/Darwin-AMD64<or whatever other name it was named>/helm /usr/local/bin/helm
-- CptDolphin
kubernetes
kubernetes-helm
macos
minikube

1 Answer

1/10/2020

There are two things to consider:

  1. Check which binary you would like: https://github.com/helm/helm/releases and copy address wget -c https://get.helm.sh/helm-v3.0.2-darwin-amd64.tar.gz tar -zxvf helm-v3.0.2-darwin-amd64.tar.gz rm -rf ~/.helm mv <directory_of_download>/Darwin-AMD64<or whatever other name it was named>/helm /usr/local/bin/helm

  2. The newest versions of K8s got some problems with installing Helm. Try to use the 1.15.4 version of K8s when starting your minikube as it was an approved workaround. minikube delete and than minikube start --kubernetes-version=1.15.4. After that helm init.

-- OhHiMark
Source: StackOverflow