2

I'd like to try out the new Ingress resource available in Kubernetes 1.1 in Google Container Engine (GKE). But when I try to create for example the following resource:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-ingress
spec:
  backend:
    serviceName: testsvc
    servicePort: 80

using:

$ kubectl create -f test-ingress.yaml

I end up with the following error message:

error: could not read an encoded object from test-ingress.yaml: API version "extensions/v1beta1" in "test-ingress.yaml" isn't supported, only supports API versions ["v1"]
error: no objects passed to create

When I run kubectl version it shows:

Client Version: version.Info{Major:"1", Minor:"0", GitVersion:"v1.0.7", GitCommit:"6234d6a0abd3323cd08c52602e4a91e47fc9491c", GitTreeState:"clean"}
Server Version: version.Info{Major:"1", Minor:"1", GitVersion:"v1.1.1", GitCommit:"92635e23dfafb2ddc828c8ac6c03c7a7205a84d8", GitTreeState:"clean"}

But I seem to have the latest kubectl component installed since running gcloud components update kubectl just gives me:

All components are up to date.

So how do I enable the extensions/v1beta1 in Kubernetes/GKE?

Johan
  • 29,394
  • 26
  • 118
  • 185

1 Answers1

1

The issue is that your client (kubectl) doesn't support the new ingress resource because it hasn't been updated to 1.1 yet. This is mentioned in the Google Container Engine release notes:

The packaged kubectl is version 1.0.7, consequently new Kubernetes 1.1 APIs like autoscaling will not be available via kubectl until next week's push of the kubectl binary.

along with the solution (download the newer binary manually).

Robert Bailey
  • 16,541
  • 2
  • 46
  • 52