kubernetes/hack/make-rules
Kubernetes Submit Queue afa99c68b8 Merge pull request #35144 from pipejakob/generate-token
Automatic merge from submit-queue

New command: "kubeadm token generate"

As part of #33930, this PR adds a new top-level command to kubeadm to just generate a token for use with the init/join commands. Otherwise, users are left to either figure out how to generate a token on their own, or let `kubeadm init` generate a token, capture and parse the output, and then use that token for `kubeadm join`.

At this point, I was hoping for feedback on the CLI experience, and then I can add tests. I spoke with @mikedanese and he didn't like the original propose of `kubeadm util generate-token`, so here are the runners up:

```
$ kubeadm generate-token          # <--- current implementation
$ kubeadm generate token          # in case kubeadm might generate other things in the future?
$ kubeadm init --generate-token   # possibly as a subcommand of an existing one
```

Currently, the output is simply the token on one line without any padding/formatting:

```
$ kubeadm generate-token
1087fd.722b60cdd39b1a5f
```

CC: @kubernetes/sig-cluster-lifecycle 

**Release note**:

<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->

``` release-note
New kubeadm command: generate-token
```
2016-11-05 16:12:52 -07:00
..
helpers Make all useage of sort deterministic 2016-10-20 16:47:20 -04:00
build.sh Add a verbosity concept to kubernetes scripts 2016-08-04 22:01:22 -07:00
cross.sh Bundle kubemark in test tarball instead of server tarball 2016-09-26 11:06:48 -07:00
test-cmd.sh Merge pull request #35484 from smarterclayton/delete_warning 2016-11-05 11:19:04 -07:00
test-e2e-node.sh Remove SELinux relabel of Kubelet dir from test-e2e-node.sh 2016-10-26 09:38:03 -04:00
test-integration.sh Make all useage of sort deterministic 2016-10-20 16:47:20 -04:00
test-kubeadm-cmd.sh Adding CLI tests for kubeadm. 2016-10-31 11:12:51 -07:00
test.sh Adding CLI tests for kubeadm. 2016-10-31 11:12:51 -07:00
verify.sh add update-staging-client-go.sh and verify-staging-client-go.sh; 2016-10-29 14:20:39 -07:00
vet.sh fix go vet errors 2016-08-10 16:45:41 -07:00