Unable to install istio on Kops instance

5/5/2020

I am trying to install Istio on a Kubernetes cluster. I created a three node cluster and installed istioctl 1.1.0 version. The istio installation comes with a istio-demo.yaml file located inside install/kubernetes/istio-demo.yaml directory. When I ran the kubectl apply -f install/kubernetes/istio-demo.yaml command, I got the below output.

Then I listed the services using kubectl get svc -n istio-system I am seeing the services

Then when I list the pods using kubectl get pod -n istio-system I cannot see the pods. Where am I going wrong?

rule.config.istio.io/tcpkubeattrgenrulerule created
    kubernetes.config.istio.io/attributes created
    destinationrule.networking.istio.io/istio-policy created
    destinationrule.networking.istio.io/istio-telemetry created
    unable to recognize "install/kubernetes/istio-demo.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
    unable to recognize "install/kubernetes/istio-demo.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
    unable to recognize "install/kubernetes/istio-demo.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
    unable to recognize "install/kubernetes/istio-demo.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
    unable to recognize "install/kubernetes/istio-demo.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
    unable to recognize "install/kubernetes/istio-demo.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
    unable to recognize "install/kubernetes/istio-demo.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"

istio-1.1.0]$ kubectl get namespaces
NAME              STATUS   AGE
default           Active   11m
istio-system      Active   100s
kube-node-lease   Active   11m
kube-public       Active   11m
kube-system       Active   11m

kubectl get pod -n istio-system
NAME                                      READY   STATUS      RESTARTS   AGE
istio-cleanup-secrets-1.1.0-fbr87         0/1     Completed   0          3m27s
istio-grafana-post-install-1.1.0-kwz58    0/1     Completed   0          3m27s
istio-security-post-install-1.1.0-mc9wk   0/1     Completed   0          3m27s

P.s: Update on the question: 1.

$ kubectl api-resources | grep deployment
deployments                       deploy       apps                           true
     Deployment
  1. Client Version: version.Info{Major:"1", Minor:"17"
-- zilcuanu
istio
kubernetes

1 Answer

5/5/2020

You can check which apis support current Kubernetes object using

$ kubectl api-resources | grep deployment
deployments                       deploy       apps                           true         Deployment

So you are trying to use deprecated apiVersion extensions/v1beta1. This was deprecated in kubernetes version 1.16. You seem to have a kubernetes cluster which is above version 1.16.

Two solutions:

  1. In the istio-demo.yaml wherever you have Deployment change the apiVersion from extensions/v1beta1 to apps/v1

  2. Istio 1.1 is pretty old so suggestion is to upgrade it to latest version which should fix the issue.

Also verify if the kubectl client version and Kubernetes server version is matching by running kubectl version

-- Arghya Sadhu
Source: StackOverflow