Kubernetes on AWS: "Error: unknown flag: --config"

11/21/2017

I've set up a Kubernetes cluster on AWS using kube-aws, but when the cluster is started, all my proxy and dashboard pods keep crashing into CrashLoopBackoff. When I run kubectl logs on the pod, I get this error:

$ kubectl logs kube-proxy-7svvr -n kube-system
Error: unknown flag: --config

This tells me that there's some sort of version mismatch, since the flag is supposed to be called --kubeconfig.

Has anyone seen this before? I'm not sure how to properly troubleshoot it.

-- Helge Talvik Söderström
amazon-web-services
kube-aws
kubernetes

1 Answer

11/21/2017

I am using kube-aws and was running an old version of Kubernetes. Updating my cluster.yaml changing the line

kubernetesVersion: v1.6.6_coreos.1

to

kubernetesVersion: v1.7.10_coreos.0

resolved my issue.

You can find information about kube-aws here and which possible Hyperkube images you can use here.

For future reference, my tools and versions that I'm running now are as follows (21st of November 2017):

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.3", GitCommit:"f0efb3cb883751c5ffdbe6d515f3cb4fbe7b7acd", GitTreeState:"clean", BuildDate:"2017-11-09T07:26:38Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"darwin/amd64"}

$ kube-aws version
kube-aws version v0.9.9-rc.2

Cluster settings:

kubernetesVersion: v1.7.10_coreos.0
etcd.version: 3.2.9

Hope this helps anyone finding this thread!

-- Helge Talvik Söderström
Source: StackOverflow