att-comdev / halcyon-kubernetes

Ansible playbooks for a kubadm-based kubernetes deployment, on supporting any cloud and any kubeadm-enabled OS.
Apache License 2.0
35 stars 22 forks source link

Error: unknown flag: --use-kubernetes-version #58

Closed mwmw7 closed 7 years ago

mwmw7 commented 7 years ago

I got a fatal error message while "vagrant up" below is error message

➜ halcyon-vagrant-kubernetes git:(master) ✗ ./setup-halcyon.sh --k8s-config kolla --k8s-version v1.5.2 --guest-os centos ➜ halcyon-vagrant-kubernetes git:(master) ✗ vagrant up ...

TASK [kube-init : initialize the kubernetes master] **** fatal:[
kube1 ]:FAILED! =>{
"changed":true, "cmd":"kubeadm init --token ac7da3.b2cofcda6ab01976 --use-kubernetes-version v1.5.2 --api-advertise-addresses 172.16.35.11", "delta":"0:00:00.067388", "end":"2017-04-17 06:39:06.573168", "failed":true, "rc":1, "start":"2017-04-17 06:39:06.505780", "stderr":"Error: unknown flag: --use-kubernetes-version\nUsage:\n kubeadm init [flags]\n\nFlags:\n --apiserver-advertise-address string The IP address the API Server will advertise it's listening on. 0.0.0.0 means the default network interface's address.\n --apiserver-bind-port int32 Port for the API Server to bind to (default 6443)\n --apiserver-cert-extra-sans stringSlice Optional extra altnames to use for the API Server serving cert. Can be both IP addresses and dns names.\n --cert-dir string The path where to save and store the certificates (default \"/etc/kubernetes/pki\")\n --config string Path to kubeadm config file (WARNING: Usage of a configuration file is experimental)\n --kubernetes-version string Choose a specific Kubernetes version for the control plane (default \"v1.6.0\")\n --pod-network-cidr string Specify range of IP addresses for the pod network; if set, the control plane will automatically allocate CIDRs for every node\n --service-cidr string Use alternative range of IP address for service VIPs (default \"10.96.0.0/12\")\n --service-dns-domain string Use alternative domain for services, e.g. \"myorg.internal\" (default \"cluster.local\")\n --skip-preflight-checks Skip preflight checks normally run before modifying the system\n --token string The token to use for establishing bidirectional trust between nodes and masters.\n --token-ttl duration The duration before the bootstrap token is automatically deleted. 0 means 'never expires'.", "stderr_lines":[
"Error: unknown flag: --use-kubernetes-version", "Usage:", " kubeadm init [flags]", "", "Flags:", " --apiserver-advertise-address string The IP address the API Server will advertise it's listening on. 0.0.0.0 means the default network interface's address.", " --apiserver-bind-port int32 Port for the API Server to bind to (default 6443)", " --apiserver-cert-extra-sans stringSlice Optional extra altnames to use for the API Server serving cert. Can be both IP addresses and dns names.", " --cert-dir string The path where to save and store the certificates (default \"/etc/kubernetes/pki\")", " --config string Path to kubeadm config file (WARNING: Usage of a configuration file is experimental)", " --kubernetes-version string Choose a specific Kubernetes version for the control plane (default \"v1.6.0\")", " --pod-network-cidr string Specify range of IP addresses for the pod network; if set, the control plane will automatically allocate CIDRs for every node", " --service-cidr string Use alternative range of IP address for service VIPs (default \"10.96.0.0/12\")", " --service-dns-domain string Use alternative domain for services, e.g. \"myorg.internal\" (default \"cluster.local\")", " --skip-preflight-checks Skip preflight checks normally run before modifying the system", " --token string The token to use for establishing bidirectional trust between nodes and masters.", " --token-ttl duration The duration before the bootstrap token is automatically deleted. 0 means 'never expires'." ], "stdout":"", "stdout_lines":[

] } ...

And I had accessed to my kube1 VM Checked kubeadm version Below is #an inforamtion of kubeadm version in my kube1 VM

[vagrant@kube1 ~]$ kubeadm version kubeadm version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.1", GitCommit:"b0b7a323cc5a4a2019b2e9520c21c7830b7f708e", GitTreeState:"clean", BuildDate:"2017-04-03T20:33:27Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}

Please check below changelog "--use-kubernetes-version" was changed https://github.com/kubernetes/kops/blob/master/vendor/k8s.io/kubernetes/CHANGELOG.md