alexellis / arkade

Open Source Marketplace For Developer Tools
https://blog.alexellis.io/kubernetes-marketplace-two-year-update/
MIT License
4.24k stars 287 forks source link

Error installing istio app #94

Open pableeee opened 4 years ago

pableeee commented 4 years ago

Hi, I was attempting to follow Alex's istio blog post, but i'm having issues installing istio.

Current Behaviour

$ arkade install istio --init=true
Using kubeconfig: /Users/user/.kube/config
Node architecture: "amd64"
Client: "x86_64", "Darwin"
2020/04/13 12:39:27 User dir established as: /Users/user/.arkade/
"istio" has been added to your repositories
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "istio" chart repository
...Successfully got an update from the "istio.io" chart repository
...Successfully got an update from the "openfaas" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈ Happy Helming!⎈
VALUES
Command: /Users/user/.arkade/bin/helm3/helm [upgrade --install istio-init istio/istio-init --namespace istio-system --wait]
Release "istio-init" does not exist. Installing it now.
NAME: istio-init
LAST DEPLOYED: Mon Apr 13 12:39:31 2020
NAMESPACE: istio-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
VALUES /var/folders/9x/llt3nz1s4bxc5t577hs4_jk57pfg8f/T/istio-values.yaml
Command: /Users/user/.arkade/bin/helm3/helm [upgrade --install istio istio/istio --namespace istio-system --values /var/folders/9x/llt3nz1s4bxc5t577hs4_jk57pfg8f/T/istio-values.yaml]
Release "istio" does not exist. Installing it now.
Error: unable to build kubernetes objects from release manifest: [unable to recognize "": no matches for kind "DestinationRule" in version "networking.istio.io/v1alpha3", unable to recognize "": no matches for kind "attributemanifest" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "handler" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "instance" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "rule" in version "config.istio.io/v1alpha2"]
Error: unable to istio install chart with helm exit code 1, stderr: Error: unable to build kubernetes objects from release manifest: [unable to recognize "": no matches for kind "DestinationRule" in version "networking.istio.io/v1alpha3", unable to recognize "": no matches for kind "attributemanifest" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "handler" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "instance" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "rule" in version "config.istio.io/v1alpha2"]

Steps to Reproduce (for bugs)

  1. kind create cluster
  2. arkade install istio --init=true

arkade.log

Context

Your Environment

$ kind version
kind v0.7.0 go1.14 darwin/amd64

$ kubectl get node -o wide
NAME                 STATUS   ROLES    AGE     VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE       KERNEL-VERSION     CONTAINER-RUNTIME
kind-control-plane   Ready    master   8m38s   v1.17.0   172.17.0.2    <none>        Ubuntu 19.10   4.19.76-linuxkit   containerd://1.3.2

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.1", GitCommit:"7879fc12a63337efff607952a323df90cdc7a335", GitTreeState:"clean", BuildDate:"2020-04-10T21:53:51Z", GoVersion:"go1.14.2", Compiler:"gc", Platform:"darwin/amd64"}
Error from server (InternalError): an error on the server ("") has prevented the request from succeeding
$ uname -a
Darwin AR0FVFZX0GEL415 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar  4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15.4
BuildVersion:   19E266
$ arkade version
Version: 0.2.6
Git Commit: 0f49b2b67bb6c7067b4eda6b99cf2fdef93cb54c
alexellis commented 4 years ago

Can you try it again?

pableeee commented 4 years ago

I just did, but got the same results. Should I change something before retrying?

alexellis commented 4 years ago

I can also reproduce the issue with KinD and a Linux host.

I wondered if whoever changed the Istio settings in #26 switched us over to helm3 which the docs state is unsupported, but helm 2 also seems to give the same error.

go build && ./arkade install istio
Using kubeconfig: /home/alex/.kube/config
Node architecture: "amd64"
Client: "x86_64", "Linux"
2020/04/13 18:26:31 User dir established as: /home/alex/.arkade/
https://get.helm.sh/helm-v2.16.0-linux-amd64.tar.gz
/home/alex/.arkade/bin/linux-amd64 linux-amd64/
/home/alex/.arkade/bin/README.md linux-amd64/README.md
/home/alex/.arkade/bin/helm linux-amd64/helm
/home/alex/.arkade/bin/LICENSE linux-amd64/LICENSE
/home/alex/.arkade/bin/tiller linux-amd64/tiller
2020/04/13 18:26:54 extracted tarball into /home/alex/.arkade/bin: 4 files, 0 dirs (22.679050457s)
Running helm init.
Creating /home/alex/.arkade/.helm/repository 
Creating /home/alex/.arkade/.helm/repository/cache 
Creating /home/alex/.arkade/.helm/repository/local 
Creating /home/alex/.arkade/.helm/plugins 
Creating /home/alex/.arkade/.helm/starters 
Creating /home/alex/.arkade/.helm/cache/archive 
Creating /home/alex/.arkade/.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/alex/.arkade/.helm.
Not installing Tiller due to 'client-only' flag having been set
"istio" has been added to your repositories
Hang tight while we grab the latest from your chart repositories...
...Skip local chart repository
...Successfully got an update from the "istio" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete.
VALUES 
Command: /home/alex/.arkade/bin/helm3/helm [upgrade --install istio-init istio/istio-init --namespace istio-system --wait]
Release "istio-init" does not exist. Installing it now.
NAME: istio-init
LAST DEPLOYED: Mon Apr 13 18:27:12 2020
NAMESPACE: istio-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
VALUES /tmp/istio-values.yaml
Command: /home/alex/.arkade/bin/helm3/helm [upgrade --install istio istio/istio --namespace istio-system --values /tmp/istio-values.yaml]
Release "istio" does not exist. Installing it now.
Error: unable to build kubernetes objects from release manifest: [unable to recognize "": no matches for kind "DestinationRule" in version "networking.istio.io/v1alpha3", unable to recognize "": no matches for kind "attributemanifest" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "handler" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "instance" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "rule" in version "config.istio.io/v1alpha2"]
Error: unable to istio install chart with helm exit code 1, stderr: Error: unable to build kubernetes objects from release manifest: [unable to recognize "": no matches for kind "DestinationRule" in version "networking.istio.io/v1alpha3", unable to recognize "": no matches for kind "attributemanifest" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "handler" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "instance" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "rule" in version "config.istio.io/v1alpha2"]

@howardjohn any thoughts on why this would "suddenly" stop working? The version still appears to be pinned as before. https://github.com/alexellis/arkade/blob/master/cmd/apps/istio_app.go#L80

alexellis commented 4 years ago

@pableeee I wonder if this is a timing / readiness issue?

I ran the command a second time and "it worked"?

Command: /home/alex/.arkade/bin/helm3/helm [upgrade --install istio-init istio/istio-init --namespace istio-system --wait]
Release "istio-init" has been upgraded. Happy Helming!
NAME: istio-init
LAST DEPLOYED: Mon Apr 13 18:32:21 2020
NAMESPACE: istio-system
STATUS: deployed
REVISION: 2
TEST SUITE: None
VALUES /tmp/istio-values.yaml
Command: /home/alex/.arkade/bin/helm3/helm [upgrade --install istio istio/istio --namespace istio-system --values /tmp/istio-values.yaml]
Release "istio" does not exist. Installing it now.
NAME: istio
LAST DEPLOYED: Mon Apr 13 18:32:24 2020
NAMESPACE: istio-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Thank you for installing Istio.

Your release is named Istio.

To get started running application with Istio, execute the following steps:
1. Label namespace that application object will be deployed to by the following command (take default namespace as an example)

$ kubectl label namespace default istio-injection=enabled
$ kubectl get namespace -L istio-injection

2. Deploy your applications

$ kubectl apply -f <your-application>.yaml

For more information on running Istio, visit:
https://istio.io/
=======================================================================
= Istio has been installed.                                        =
=======================================================================

# Find out more at:
# https://github.com/istio/

Thanks for using arkade!
howardjohn commented 4 years ago

https://github.com/alexellis/arkade/blob/master/cmd/apps/istio_app.go#L121 is triggering some jobs. Maybe those do not complete before the next step. IN https://istio.io/docs/setup/install/helm/#installation-steps we add a kubectl wait step

alexellis commented 4 years ago

From my testing, it appears to just be a timing issue. The CRDs come up but seem to take up to 60s to 2 minutes to appear.

alexellis commented 4 years ago

See below:

alex@alex-nuc8:~/go/src/github.com/alexellis/arkade$ /home/alex/.arkade/bin/helm3/helm upgrade --install istio-init istio/istio-init --namespace istio-system --wait
Release "istio-init" has been upgraded. Happy Helming!
NAME: istio-init
LAST DEPLOYED: Mon Apr 13 18:37:38 2020
NAMESPACE: istio-system
STATUS: deployed
REVISION: 2
TEST SUITE: None
alex@alex-nuc8:~/go/src/github.com/alexellis/arkade$ kubectl get crd/destinationrules.networking.istio.io
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "destinationrules.networking.istio.io" not found
alex@alex-nuc8:~/go/src/github.com/alexellis/arkade$ kubectl get crd/destinationrules.networking.istio.io
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "destinationrules.networking.istio.io" not found
alex@alex-nuc8:~/go/src/github.com/alexellis/arkade$ kubectl get crd/destinationrules.networking.istio.io
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "destinationrules.networking.istio.io" not found
alex@alex-nuc8:~/go/src/github.com/alexellis/arkade$ kubectl get crd/destinationrules.networking.istio.io
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "destinationrules.networking.istio.io" not found
alex@alex-nuc8:~/go/src/github.com/alexellis/arkade$ kubectl get crd/destinationrules.networking.istio.io
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "destinationrules.networking.istio.io" not found
alex@alex-nuc8:~/go/src/github.com/alexellis/arkade$ kubectl get crd/destinationrules.networking.istio.io
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "destinationrules.networking.istio.io" not found
alex@alex-nuc8:~/go/src/github.com/alexellis/arkade$ kubectl get crd/destinationrules.networking.istio.io
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "destinationrules.networking.istio.io" not found
alex@alex-nuc8:~/go/src/github.com/alexellis/arkade$ kubectl get crd/destinationrules.networking.istio.io
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "destinationrules.networking.istio.io" not found
alex@alex-nuc8:~/go/src/github.com/alexellis/arkade$ kubectl get crd/destinationrules.networking.istio.io
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "destinationrules.networking.istio.io" not found
alex@alex-nuc8:~/go/src/github.com/alexellis/arkade$ kubectl get crd
No resources found in default namespace.
alex@alex-nuc8:~/go/src/github.com/alexellis/arkade$ kubectl get crd
No resources found in default namespace.
alex@alex-nuc8:~/go/src/github.com/alexellis/arkade$ kubectl get crd
No resources found in default namespace.
alex@alex-nuc8:~/go/src/github.com/alexellis/arkade$ kubectl get crd
No resources found in default namespace.
alex@alex-nuc8:~/go/src/github.com/alexellis/arkade$ kubectl get crd
NAME                                      CREATED AT
adapters.config.istio.io                  2020-04-13T17:38:38Z
attributemanifests.config.istio.io        2020-04-13T17:38:37Z
authorizationpolicies.security.istio.io   2020-04-13T17:38:36Z
clusterrbacconfigs.rbac.istio.io          2020-04-13T17:38:37Z
destinationrules.networking.istio.io      2020-04-13T17:38:37Z
alexellis commented 4 years ago

See how @stefanprodan does this in Flagger -> https://github.com/weaveworks/flagger/blob/98ba38d436f75334487730374c699b183b1f204a/test/e2e-smi-istio.sh#L14

We have to do the same and must have been relying on luck and timing before.

This kind of info would have been good in the Istio docs. cc @craigbox - I know istioctl is going to surpass helm, but WDYT?

pableeee commented 4 years ago

@alexellis It does looks like a timing issue, running the command for a second time gets the job done.

craigbox commented 4 years ago

@howardjohn linked to where it's listed in the Helm docs; if there's anywhere else you'd like me to update, then happy to do so!