att-comdev / halcyon-vagrant-kubernetes

Vagrant deployment mechanism for halcyon-kubernetes.
Apache License 2.0
12 stars 14 forks source link

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

Open mwmw7 opened 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

mwmw7 commented 7 years ago

I found below in master branch of kubernetes

commit 1bd8bf6c5bf0b6499590efe65a7030077463ae27 Author: Alexander Kanevskiy alexander.kanevskiy@intel.com Date: Tue Feb 21 20:09:53 2017 +0200

Changing --use-kubernetes-version to --kubernetes-version as it was
agreed on SIG-Cluster-Lifecycle meeting.

commit 98ff34cc389199027f65064518f0e43c945f4d9e Merge: 6969aff 5cbefbc Author: Kubernetes Submit Queue k8s-merge-robot@users.noreply.github.com Date: Thu Mar 2 05:00:50 2017 -0800

Merge pull request #42064 from luxas/kubeadm_beta_init_ux

Automatic merge from submit-queue (batch tested with PRs 42128, 42064, 42253, 42309, 42322)

kubeadm: Rename some flags for beta UI and fixup some logic

**What this PR does / why we need it**:

In this PR:
 - `--api-advertise-addresses` becomes `--apiserver-advertise-address`
   - The API Server's logic here is that if the address is `0.0.0.0`, it chooses the host's default interface's address. kubeadm here uses exactly the same logic. This arg is then passed to `--advertise-address`, and the API Server will advertise that one for the service VIP.
 - `--api-port` becomes `--apiserver-bind-port` for clarity

ref the meeting notes: https://docs.google.com/document/d/1deJYPIF4LmhGjDVaqrswErIrV7mtwJgovtLnPCDxP7U/edit#

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
```
@jbeda @dmmcquay @pires @lukemarsden @dgoodwin @mikedanese
mwmw7 commented 7 years ago

And I want to make a PR for it

v1k0d3n commented 7 years ago

sounds good @mwmw7. be aware that kubeadm support for 1.5.x was dropped in favor of 1.6 going forward, and with that you will need to work with RBAC in order to get the cluster working correctly with either Openstack-Helm or Kolla-Kubernetes.

v1k0d3n commented 7 years ago

btw, you may want to check out our new kubeadm-baseed development environment. a PS here clarifies some things in the README, but for the most part...the development environment works similar to an AIO minikube. if you want multi-host support thank this is still a good repo, but we'll need to make some changes for kubeadm 1.6. i'm really glad you submitted an issue and will follow-up with a PR. thank you!