Page MenuHomePhabricator

Error: error installing: the server could not find the requested resource
Closed, ResolvedPublic

Description

I'm following the readme file. I'm getting Error: error installing: the server could not find the requested resource after I run releng/local-charts$ make start. Am I doing something wrong?

Environment:

  • macOS 10.13.6

1~/Documents/gerrit/releng/local-charts$ git log --oneline -1
22441d99 (HEAD -> master, origin/master, origin/HEAD) local-charts: CLI for managing minikube, helm, etc
3
4
5
6~/Documents/gerrit/releng/local-charts$ brew list
7
8
9
10~/Documents/gerrit/releng/local-charts$ brew cask list
11
12
13
14~/Documents/gerrit/releng/local-charts$ sysctl -a | grep -E --color 'machdep.cpu.features|VMX'
15machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC POPCNT AES PCID XSAVE OSXSAVE TSCTMR AVX1.0 RDRAND F16C
16
17
18
19~/Documents/gerrit/releng/local-charts$ make install
20(cd ./bin && ./install_prereqs.sh)
21Ensuring homebrew caskroom is installed...
22Installing minikube...
23==> Satisfying dependencies
24==> Installing Formula dependencies: kubernetes-cli
25==> Installing kubernetes-cli
26==> Downloading https://homebrew.bintray.com/bottles/kubernetes-cli-1.16.0.high_sierra.bottle.tar.gz
27Already downloaded: /Users/z/Library/Caches/Homebrew/downloads/e672c18ad0204d6d1a340e37968d7061cd11d72be768bde3f82fb8460b5581b4--kubernetes-cli-1.16.0.high_sierra.bottle.tar.gz
28==> Pouring kubernetes-cli-1.16.0.high_sierra.bottle.tar.gz
29==> Caveats
30Bash completion has been installed to:
31 /usr/local/etc/bash_completion.d
32
33zsh completions have been installed to:
34 /usr/local/share/zsh/site-functions
35==> Summary
36๐Ÿบ /usr/local/Cellar/kubernetes-cli/1.16.0: 232 files, 52.3MB
37==> Downloading https://storage.googleapis.com/minikube/releases/v1.4.0/minikube-darwin-amd64
38Already downloaded: /Users/z/Library/Caches/Homebrew/downloads/33746757457a7cbfeecb9411a4eabfd65bfbdf8b8b0e4eeec1f623464cf976c3--minikube-darwin-amd64
39==> Verifying SHA-256 checksum for Cask 'minikube'.
40==> Installing Cask minikube
41==> Linking Binary 'minikube-darwin-amd64' to '/usr/local/bin/minikube'.
42๐Ÿบ minikube was successfully installed!
43Kubectl already installed - Skipping kubectl install step.
44Installing hyperkit...
45==> Installing dependencies for docker-machine-driver-hyperkit: docker-machine
46==> Installing docker-machine-driver-hyperkit dependency: docker-machine
47==> Downloading https://homebrew.bintray.com/bottles/docker-machine-0.16.2.high_sierra.bottle.tar.gz
48Already downloaded: /Users/z/Library/Caches/Homebrew/downloads/0fec7f545e36d5c75903c916207ba4e86f8d59c7851de64c4aa11aa799fe4788--docker-machine-0.16.2.high_sierra.bottle.tar.gz
49==> Pouring docker-machine-0.16.2.high_sierra.bottle.tar.gz
50==> Caveats
51Bash completion has been installed to:
52 /usr/local/etc/bash_completion.d
53
54zsh completions have been installed to:
55 /usr/local/share/zsh/site-functions
56
57To have launchd start docker-machine now and restart at login:
58 brew services start docker-machine
59Or, if you don't want/need a background service you can just run:
60 docker-machine start
61==> Summary
62๐Ÿบ /usr/local/Cellar/docker-machine/0.16.2: 11 files, 36MB
63==> Installing docker-machine-driver-hyperkit
64==> Downloading https://homebrew.bintray.com/bottles/docker-machine-driver-hyperkit-1.0.0.high_sierra.bottle.tar.gz
65Already downloaded: /Users/z/Library/Caches/Homebrew/downloads/1ed8356584f594ffbe9c5d95a65226908b4289d23fcfac8b9bdbc5338e90b9cc--docker-machine-driver-hyperkit-1.0.0.high_sierra.bottle.tar.gz
66==> Pouring docker-machine-driver-hyperkit-1.0.0.high_sierra.bottle.tar.gz
67==> Caveats
68This driver requires superuser privileges to access the hypervisor. To
69enable, execute:
70 sudo chown root:wheel /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit
71 sudo chmod u+s /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit
72==> Summary
73๐Ÿบ /usr/local/Cellar/docker-machine-driver-hyperkit/1.0.0: 5 files, 13.5MB
74==> Installing dependencies for hyperkit: libev
75==> Installing hyperkit dependency: libev
76==> Downloading https://homebrew.bintray.com/bottles/libev-4.27.high_sierra.bottle.tar.gz
77Already downloaded: /Users/z/Library/Caches/Homebrew/downloads/0593f32c6218389f698c72519996a6cbf181c12764edc02ca0c2ef67f259ff40--libev-4.27.high_sierra.bottle.tar.gz
78==> Pouring libev-4.27.high_sierra.bottle.tar.gz
79๐Ÿบ /usr/local/Cellar/libev/4.27: 12 files, 438.8KB
80==> Installing hyperkit
81==> Downloading https://homebrew.bintray.com/bottles/hyperkit-0.20190802.high_sierra.bottle.tar.gz
82Already downloaded: /Users/z/Library/Caches/Homebrew/downloads/65d73766ee84755b37d90d883f14e83ba25de7b63284b5354b8fc3ca28c7ffcb--hyperkit-0.20190802.high_sierra.bottle.tar.gz
83==> Pouring hyperkit-0.20190802.high_sierra.bottle.tar.gz
84๐Ÿบ /usr/local/Cellar/hyperkit/0.20190802: 5 files, 4MB
85==> Caveats
86==> docker-machine
87Bash completion has been installed to:
88 /usr/local/etc/bash_completion.d
89
90zsh completions have been installed to:
91 /usr/local/share/zsh/site-functions
92
93To have launchd start docker-machine now and restart at login:
94 brew services start docker-machine
95Or, if you don't want/need a background service you can just run:
96 docker-machine start
97==> docker-machine-driver-hyperkit
98This driver requires superuser privileges to access the hypervisor. To
99enable, execute:
100 sudo chown root:wheel /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit
101 sudo chmod u+s /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit
102Giving hyperkit driver superuser privileges...
103Password:
104Making /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit setuid...Installing helm...
105==> Downloading https://homebrew.bintray.com/bottles/kubernetes-helm-2.14.3.high_sierra.bottle.tar.gz
106Already downloaded: /Users/z/Library/Caches/Homebrew/downloads/c031725ffd8c04a015fb384ebb107e4454b6e30b385efc400306d929e5d77634--kubernetes-helm-2.14.3.high_sierra.bottle.tar.gz
107==> Pouring kubernetes-helm-2.14.3.high_sierra.bottle.tar.gz
108==> Caveats
109Bash completion has been installed to:
110 /usr/local/etc/bash_completion.d
111
112zsh completions have been installed to:
113 /usr/local/share/zsh/site-functions
114==> Summary
115๐Ÿบ /usr/local/Cellar/kubernetes-helm/2.14.3: 51 files, 91.6MB
116Making hyperkit the default VM driver...
117โš ๏ธ These changes will take effect upon a minikube delete and then a minikube start
118helm repo add wikimedia https://releases.wikimedia.org/charts/
119"wikimedia" has been added to your repositories
120
121
122
123~/Documents/gerrit/releng/local-charts$ cp values.example.yaml values.yaml
124
125
126
127~/Documents/gerrit/releng/local-charts$ make start
128minikube start
129๐Ÿ˜„ minikube v1.4.0 on Darwin 10.13.6
130๐Ÿ’ก Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one.
131๐Ÿƒ Using the running hyperkit "minikube" VM ...
132โŒ› Waiting for the host to be provisioned ...
133๐Ÿณ Preparing Kubernetes v1.16.0 on Docker 18.06.2-ce ...
134๐Ÿ”„ Relaunching Kubernetes using kubeadm ...
135โŒ› Waiting for: apiserver proxy etcd scheduler controller dns
136๐Ÿ„ Done! kubectl is now configured to use "minikube"
137helm init --wait
138$HELM_HOME has been configured at /Users/z/.helm.
139Error: error installing: the server could not find the requested resource
140make: *** [start] Error 1

Details

Related Gerrit Patches:

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptSep 26 2019, 3:29 PM
zeljkofilipin triaged this task as Medium priority.Sep 26 2019, 4:40 PM
zeljkofilipin added a subscriber: jeena.

According to @jeena, it's a know problem: Helm init fails on Kubernetes 1.16.0. The workaround is to downgrade Kubernetes to 1.15.

@jeena looks like downgrading kubernetes isn't trivial.

~$ brew uninstall kubernetes-cli --force
Uninstalling kubernetes-cli... (232 files, 52.3MB)

~$ brew install kubernetes-cli@1.15
Error: No available formula with the name "kubernetes-cli@1.15" 
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
  git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.

I've ended up following the official docs.

~$ curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/darwin/amd64/kubectl

~$ chmod +x ./kubectl

~$ sudo mv ./kubectl /usr/local/bin/kubectl

~$ kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:40:16Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"darwin/amd64"}
Unable to connect to the server: dial tcp 192.168.64.8:8443: i/o timeout

Still no luck.

~/Documents/gerrit/releng/local-charts$ make start
minikube start
๐Ÿ˜„  minikube v1.4.0 on Darwin 10.13.6
๐Ÿ”ฅ  Creating hyperkit VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
๐Ÿณ  Preparing Kubernetes v1.16.0 on Docker 18.09.9 ...
๐Ÿšœ  Pulling images ...
๐Ÿš€  Launching Kubernetes ... 
โŒ›  Waiting for: apiserver proxy etcd scheduler controller dns
๐Ÿ„  Done! kubectl is now configured to use "minikube"
helm init --wait
$HELM_HOME has been configured at /Users/z/.helm.
Error: error installing: the server could not find the requested resource
make: *** [start] Error 1

Look like I have kubectl client 1.15, but server 1.16 ๐Ÿคทโ€โ™‚๏ธ

~/Documents/gerrit/releng/local-charts$ kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:40:16Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:27:17Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}

I don't know how to fix that.

jeena added a comment.EditedSep 27 2019, 4:53 PM

you need to downgrade your minikube to version 1.3
If using homebrew, you can do it by installing a link to the old file. I found the commit on github.
so I think you need to do the following:

brew cask uninstall minikube
brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask/210a0d0c3d8dcd555985092c756e17f721828328/Casks/minikube.rb

zeljkofilipin added a comment.EditedSep 30 2019, 12:50 PM

Progress! ๐Ÿ˜ But something is still broken. ๐Ÿค”

~$ brew cask uninstall minikube
==> Uninstalling Cask minikube
==> Unlinking Binary '/usr/local/bin/minikube'.
==> Purging files for version 1.4.0 of Cask minikube

Looks like it's still installing kubernetes-cli-1.16.0:

~$  brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask/210a0d0c3d8dcd555985092c756e17f721828328/Casks/minikube.rb
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
No changes to formulae.

==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-cask/210a0d0
######################################################################## 100.0%
==> Satisfying dependencies
==> Installing Formula dependencies: kubernetes-cli
==> Installing kubernetes-cli
==> Downloading https://homebrew.bintray.com/bottles/kubernetes-cli-1.16.0.high_
Already downloaded: /Users/z/Library/Caches/Homebrew/downloads/e672c18ad0204d6d1a340e37968d7061cd11d72be768bde3f82fb8460b5581b4--kubernetes-cli-1.16.0.high_sierra.bottle.tar.gz
==> Pouring kubernetes-cli-1.16.0.high_sierra.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions have been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
๐Ÿบ  /usr/local/Cellar/kubernetes-cli/1.16.0: 232 files, 52.3MB
==> Downloading https://storage.googleapis.com/minikube/releases/v1.3.1/minikube
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'minikube'.
==> Installing Cask minikube
==> Linking Binary 'minikube-darwin-amd64' to '/usr/local/bin/minikube'.
๐Ÿบ  minikube was successfully installed!
~/Documents/gerrit/releng/local-charts$ make install
(cd ./bin && ./install_prereqs.sh)
Ensuring homebrew caskroom is installed...
Minikube already installed - Skipping minikube install step.
Kubectl already installed - Skipping kubectl install step.
Hyperkit already installed - Skipping hyperkit install step.
Helm already installed - Skipping helm install step.
Making hyperkit the default VM driver...
โš ๏ธ  minikube 1.4.0 is available! Download it: https://github.com/kubernetes/minikube/releases/tag/v/1.4.0
๐Ÿ’ก  To disable this notice, run: 'minikube config set WantUpdateNotification false'
โš ๏ธ  These changes will take effect upon a minikube delete and then a minikube start
helm repo add wikimedia https://releases.wikimedia.org/charts/
"wikimedia" has been added to your repositories
~/Documents/gerrit/releng/local-charts$ make start
minikube start
๐Ÿ˜„  minikube v1.3.1 on Darwin 10.13.6
โš ๏ธ  Error checking driver version: exit status 1
๐Ÿ’ฟ  Downloading VM boot image ...
minikube-v1.3.0.iso.sha256: 65 B / 65 B [--------------------] 100.00% ? p/s 0s
minikube-v1.3.0.iso: 131.07 MiB / 131.07 MiB [-------] 100.00% 3.29 MiB p/s 40s
๐Ÿ”ฅ  Creating hyperkit VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
๐Ÿณ  Preparing Kubernetes v1.15.2 on Docker 18.09.8 ...
E0930 12:59:51.874399   13279 start.go:558] Error caching images:  Caching images for kubeadm: caching images: caching image /Users/z/.minikube/cache/images/k8s.gcr.io/kube-proxy_v1.15.2: fetching remote image: Get https://k8s.gcr.io/v2/token?scope=repository%3Akube-proxy%3Apull&service=k8s.gcr.io: invoking docker-credential-desktop: exec: "docker-credential-desktop": executable file not found in $PATH; output: 
โŒ  Unable to load cached images: loading cached images: loading image /Users/z/.minikube/cache/images/k8s.gcr.io/kube-proxy_v1.15.2: stat /Users/z/.minikube/cache/images/k8s.gcr.io/kube-proxy_v1.15.2: no such file or directory
๐Ÿ’พ  Downloading kubeadm v1.15.2
๐Ÿ’พ  Downloading kubelet v1.15.2
๐Ÿšœ  Pulling images ...
๐Ÿš€  Launching Kubernetes ... 
โŒ›  Waiting for: apiserver proxy etcd scheduler controller dns
๐Ÿ„  Done! kubectl is now configured to use "minikube"
helm init --wait
$HELM_HOME has been configured at /Users/z/.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
./bin/sshfs_keygen.sh
Generating public/private rsa key pair.
Your identification has been saved in /home/docker/.ssh/id_rsa.
Your public key has been saved in /home/docker/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:r3NeyooOFUqoow4TYdzuz5j1v3j5od5Vnjmx9E3JKuY docker@minikube
The key's randomart image is:
+---[RSA 2048]----+
|                 |
|. ..             |
|.o... .          |
|.o.. . .      . .|
|+  .. . S      *.|
|.o.  .   .    =.B|
|+  ...    o+.o *o|
|o.  *...o=*o+   .|
| . o +oo*X*E     |
+----[SHA256]-----+
Saving key to authorized_keys file.
~/Documents/gerrit/releng/local-charts$ make deploy
helm dependency update ./helm
Hang tight while we grab the latest from your chart repositories...
...Unable to get an update from the "local" chart repository (http://127.0.0.1:8879/charts):
	Get http://127.0.0.1:8879/charts/index.yaml: dial tcp 127.0.0.1:8879: connect: connection refused
...Successfully got an update from the "wikimedia" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete.
Saving 4 charts
Downloading mariadb from repo https://kubernetes-charts.storage.googleapis.com/
Downloading mediawiki-dev from repo https://releases.wikimedia.org/charts/
Downloading parsoid from repo https://releases.wikimedia.org/charts/
Deleting outdated charts
helm install --name "default" -f "values.yaml" --set mediawiki.main_app.xdebug.remoteHost=192.168.64.1 ./helm
Error: render error in "local-charts/charts/mediawiki/templates/secrets.yaml": template: local-charts/charts/mediawiki/templates/secrets.yaml:5:11: executing "local-charts/charts/mediawiki/templates/secrets.yaml" at <include "mediawiki.fullname" .>: error calling include: template: no template "mediawiki.fullname" associated with template "gotpl"
make: *** [deploy] Error 1
zeljkofilipin removed zeljkofilipin as the assignee of this task.Oct 2 2019, 1:11 PM
zeljkofilipin closed this task as Resolved.Oct 25 2019, 11:45 AM
zeljkofilipin claimed this task.

Upstream has fixed the problem. I no longer get that error message.

Change 546750 had a related patch set uploaded (by Brennen Bearnes; owner: Brennen Bearnes):
[releng/local-charts@master] debian_prereq.sh: bump helm version to 2.15.1

https://gerrit.wikimedia.org/r/546750

Change 546750 merged by Brennen Bearnes:
[releng/local-charts@master] debian_prereq.sh: bump helm version to 2.15.1

https://gerrit.wikimedia.org/r/546750