Commit Graph

468 Commits (57df11bc0f2605701e46a96d7fd4a33fce600dd2)

Author SHA1 Message Date
xilabao 20876757c2 add set rolebinding/clusterrolebinding command 2017-05-05 09:55:35 +08:00
Fabiano Franz 2158473474 Plugins are loaded under the 'kubectl plugin' command 2017-04-28 01:34:07 -03:00
Kubernetes Submit Queue e6ecfd2e37 Merge pull request #41694 from shiywang/apply-set1
Automatic merge from submit-queue (batch tested with PRs 42044, 41694, 41927, 42050, 41987)

Add apply set-last-applied subcommand 

implement part of https://github.com/kubernetes/community/pull/287, will rebase after https://github.com/kubernetes/kubernetes/pull/41699 got merged, EDIT: since bug output format has been confirmed, will update the behavior of output format soon  
cc @kubernetes/sig-cli-pr-reviews @AdoHe @pwittrock 

```release-note
Support kubectl apply set-last-applied command to update the applied-applied-configuration annotation
```
2017-02-26 23:16:51 -08:00
Shiyang Wang 9bace3e379 add apply-set-last-applied subcommand
update

update code

update unit tests

hack/update

remove spew

update bazel

updated

add comments

remove unused parameter

remove hardcode

bump unit tests

add new flags

add unit tests

add bazel

genreate doc
2017-02-24 11:11:39 +08:00
deads2k 5b4a611fd7 add kubectl can-i to see if you can perform an action 2017-02-23 09:12:35 -05:00
Kubernetes Submit Queue c99ae4b436 Merge pull request #41538 from xingzhou/clusterrole
Automatic merge from submit-queue (batch tested with PRs 41146, 41486, 41482, 41538, 41784)

Added `kubectl create clusterrole` command.

Added `kubectl create clusterrole` command.

Fixed part of #39596 

**Special notes for your reviewer**:
@deads2k, please help to review this patch, thanks

**Release note**:
```
   Added one new command `kubectl create clusterrole` to help user create a single ClusterRole from command line.
```
2017-02-22 21:09:36 -08:00
Xing Zhou 433941f1fd Added `kubectl create clusterrole` command.
Added `kubectl create clusterrole` command.
2017-02-22 10:30:41 +08:00
shiywang 557c18694a Add apply view last-applied subcommand
change to GetOriginalConfiguration

add bazel

refactor apply view-last-applied command

update some changes

minor change

add unit tests, update

update some codes and genreate docs

update LongDesc
2017-02-21 20:08:25 +08:00
Xing Zhou 89021157b0 Added generated docs for kubectl create role command.
Added generated docs for kubectl create role command.
2017-02-10 13:10:47 +08:00
Jordan Liggitt 83e06d9fd1
Revert "Add the ability to edit fields within a config map."
This reverts commit 31eca372c9.
2017-01-25 09:12:32 -05:00
Brendan Burns 31eca372c9 Add the ability to edit fields within a config map. 2017-01-14 21:12:27 -08:00
deads2k 8b25c21e79 add create rolebinding 2016-12-21 09:03:27 -05:00
Angus Salkeld 17a711d8fd Add new command "kubectl set selector" 2016-12-21 12:30:56 +01:00
Michail Kargakis b8fab92600 kubectl: generated changes for new pdb command 2016-12-02 18:42:25 +01:00
Kubernetes Submit Queue 74066816b6 Merge pull request #37098 from deads2k/cli-12-create-cbinding
Automatic merge from submit-queue

add create clusterrolebinding command

Adds `kubectl create clusterrolebinding`.

@kubernetes/sig-cli
2016-12-02 08:44:58 -08:00
Kubernetes Submit Queue bbd447f555 Merge pull request #34789 from AdoHe/external_service
Automatic merge from submit-queue

create service add create ExternalName service implementation

@kubernetes/kubectl create service add ExternalName support, refer #34731 for more detail.

```release-note
kubectl create service externalname
```
2016-12-02 07:29:06 -08:00
deads2k e300f01a1b add create clusterrolebinding command 2016-11-21 08:50:06 -05:00
AdoHe d66bcbfa61 create service add create ExternalName service implementation 2016-11-16 04:47:10 -05:00
Mike Danese 98e6d2c1e5 autogenerated 2016-11-08 06:33:46 -08:00
Brendan Burns d65757fb88 add kubectl cp 2016-10-29 20:24:54 -07:00
Jacob Tanenbaum 901bbee2fd Add 'kubectl set limit'
Add a way to set resource limits/requests on running pods

Ref: https://github.com/kubernetes/kubernetes/issues/21648

I squashed the commits to make rebasing easier
Change log:

- fixed a typo that caused the command to be run with kubectl set set instead of the correct kubectl set limit

- added a ResourcesWithPodTemplates to pkg/kubectl/cmd/util/factory.go
     instead of hardcoding these resources move there description all in one place

- Fixing some of the flow control in kubectl set limit

- update the help info

- changed the name of ResourcesWithPodTemplates to ResourcesWithPodSpecs to more accuratly describe what it is doing
    and changed the variable names to lower case to conform to go's variable naming convention

- changing the name of the command from 'set limit' to 'set resources'

- Adding the new file pkg/kubectl/cmd/set/set_resources.go

- changes to the test cases to reflect the change from 'kubectl set limit' to 'kubectl set resources'

- comment removed

- adding the man page to the git repository attempting to fix Jenkins tests

- adding the user guide

- fixed a few typos

- typo in hack/cmd-test.sh

- implamenting suggestions for command help text

- adding the dry-run flag

- removing the "remove" option in favor of zeroing out request/limits in order to remove them

- changed limits/requests to requests/limit

- changing ResourcesWithPodSpec

- updated generated docs and removed whitespace

- change priint on success message from "resource limits/requests updated" to "resource requirements updated"

- minor rebasing issues - 'hack/test-cmd.sh' now passes

- cmdutil.PrintSuccess added another argument

- fixing mungedocs failure

- removed whitespace from hack/make-rules/test-cmd.sh and an erroneous entry from pkg/cloudprovider/providers/openstack/MAINTAINERS.md

- fixed typo in Short: field of the cobra command

- rebased

- Creating a new factory in the ResourcesWithPodSpecs() so that the testing will pass

- changing ResourcesWithPodSpecs, it doesn't need to be a method of factory
2016-10-14 08:35:32 -04:00
Kubernetes Submit Queue beba1e2c8f Merge pull request #33275 from maciaszczykm/remove-kubectl-namespace-cmd
Automatic merge from submit-queue

Remove kubectl namespace command

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

It removes deprecated `kubectl namespace` command, which `has been superseded by the context.namespace field of .kubeconfig files.  See 'kubectl config set-context --help' for more details`. It was done nearly two years ago, so like `// TODO remove once people have been given enough time to notice` comment says it may be a good time to get rid of it.

**Special notes for your reviewer**:

None ATM.

**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
Remove kubectl namespace command
```
2016-09-24 02:51:39 -07:00
Manjunath A Kumatagi 6047787fa3 Add support for generating all the manpages to genman 2016-09-22 20:09:22 +05:30
Marcin Maciaszczyk d2a288de6a Remove kubectl namespace command 2016-09-22 15:46:20 +02:00
Kubernetes Submit Queue e24aff0711 Merge pull request #29821 from alexbrand/config-cluster
Automatic merge from submit-queue

Add get/delete cluster, delete context to kubectl config

Fixes #29794 by adding `get-clusters`, `delete-cluster` and `delete-context` actions to `kubectl config`.
2016-08-26 11:44:46 -07:00
AdoHe b411fe217f update kubectl help output for better organization 2016-08-20 08:03:39 +08:00
mksalawa 5df9fe684d Implement kubectl top command with subcommands. 2016-08-11 17:25:18 +02:00
Angus Salkeld bd0b7528b5 Add "create deployment" sub-command 2016-08-08 13:24:30 +10:00
Angus Salkeld 42ca885edb Add "create service" sub-commands
This adds:
 create service clusterip
 create service nodeport
 create service loadbalancer
2016-08-08 12:31:21 +10:00
abrand 82c700c896 Add get/delete cluster, delete context to kubectl 2016-08-01 17:04:13 -04:00
Dr. Stefan Schimanski 199f991f6a Add --scopes to kubectl-create-quota and add tests 2016-07-26 14:12:35 +02:00
Angus Salkeld e0ce987f4e Add command "kubectl config get-contexts"
Note: Context is not a runtime object (doesn't have Kind and Version) so
      we can't use the resource_printer
2016-07-05 11:24:00 +02:00
Daniel Smith 1d25410c3b Run new update-generated-docs.sh script 2016-06-08 17:25:21 -07:00
Matt Liggett d09af4a1d6 Stop 'drain' deleting pods with local storage.
Unless forced with --delete-local-data.  Also a refactoring of the
kubectl drain logic that selects/rejects pods and produces error/warning
messages.
2016-06-08 14:59:03 -07:00
k8s-merge-robot 8c66ffbddc Merge pull request #26581 from caesarxuchao/continue-25746
Automatic merge from submit-queue

fix kubectl patch example

Based on https://github.com/kubernetes/kubernetes/pull/25746, fix the kubectl example.

cc @tobstarr
2016-06-02 07:48:07 -07:00
Dr. Stefan Schimanski 026804c2be Fix kubectl --attach decription with deprecated --interactive 2016-06-01 13:21:39 +02:00
Chao Xu 216649b822 fix kubectl patch example 2016-05-31 11:45:12 -07:00
k8s-merge-robot d957e78a41 Merge pull request #25253 from soltysh/issue24533
Automatic merge from submit-queue

kubectl run --restart=Never creates pods

Fixes #24533.

@bgrant0607 @janetkuo ptal
/fyi @thockin

```release-note
* kubectl run --restart=Never creates pods
```
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-31 11:44:05 -07:00
Dr. Stefan Schimanski 9e25d9f614 Run hack/update-generated-docs.sh 2016-05-30 07:28:48 +02:00
Maciej Szulik d76fa8a119 kubectl run --restart=Never creates pods 2016-05-28 07:08:32 +02:00
k8s-merge-robot 50524c78a1 Merge pull request #20672 from brendandburns/dump
Automatic merge from submit-queue

Add a 'kubectl clusterinfo dump' option

Ref: #3500 

@bgrant0607 @smarterclayton @jszczepkowski 

Usage:
```
  # Dump current cluster state to stdout
  kubectl clusterinfo dump
  
  # Dump current cluster state to /tmp
  kubectl clusterinfo dump --output-directory=/tmp
  
  # Dump all namespaces to stdout
  kubectl clusterinfo dump --all-namespaces
  
  # Dump a set of namespaces to /tmp
  kubectl clusterinfo dump --namespaces default,kube-system --output-directory=/tmp
```

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/20672)
<!-- Reviewable:end -->
2016-05-24 14:24:17 -07:00
k8s-merge-robot 39f0c6ba25 Merge pull request #24719 from bprashanth/kubectl_tls
Automatic merge from submit-queue

Add a kubectl create secret tls command

A somewhat hasty implementation that enables progress along: https://github.com/kubernetes/kubernetes/issues/20176#issuecomment-177409516, https://github.com/kubernetes/kubernetes/issues/24669, https://github.com/kubernetes/kubernetes/issues/20176#issuecomment-198142836 if associated parties have spare cycles. @kubernetes/kubectl

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24719)
<!-- Reviewable:end -->
2016-05-22 09:40:42 -07:00
Janet Kuo 4332472bde Add 'kubectl set image' 2016-05-18 21:23:17 -07:00
Kevin 52fb89ff73 implement taints and tolerations 2016-05-18 15:06:23 +00:00
Brendan Burns 178b5f7638 address comments 2016-05-17 10:24:29 -07:00
Prashanth Balasubramanian daa8e29c5b Add a kubectl create secret tls command 2016-05-16 22:38:56 -07:00
Brendan Burns 092afb6285 Address comments. 2016-05-16 16:50:53 -07:00
Brendan Burns 3c9fb1b651 Add a 'kubectl clusterinfo dump' option 2016-05-16 16:50:53 -07:00
k8s-merge-robot b8f1682695 Merge pull request #24090 from AdoHe/expose_rc
Automatic merge from submit-queue

fix expose multi protocols issue

Please refer #23882 for more detail. @bprashanth @bgrant0607 ptal.

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24090)
<!-- Reviewable:end -->
2016-05-14 07:15:58 -07:00
k8s-merge-robot 0c2641d4ea Merge pull request #19946 from janetkuo/kubectl-rollout-status
Automatic merge from submit-queue

Add `kubectl rollout status`

## Pull Request Guidelines

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
1. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
1. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.

```release-note
Implement `kubectl rollout status` that can be used to watch a deployment's rollout status
```

Addresses #17168; depends on #19882 (the "Add kubectl rollout" commit).
See [proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/deploy.md#deployment-version). 

cc @bgrant0607 @nikhiljindal @ironcladlou @kargakis @kubernetes/sig-config @kubernetes/kubectl  @madhusudancs

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/19946)
<!-- Reviewable:end -->
2016-05-12 06:28:49 -07:00
AdoHe ad97cddb3e fix expose multi protocols issue 2016-05-12 00:07:07 -04:00
Janet Kuo eb58cd6676 Add 'kubectl set' 2016-05-10 17:24:25 -07:00
Janet Kuo 67becccda0 Add kubectl rollout status 2016-05-10 13:49:39 -07:00
k8s-merge-robot 41b7b04faf Merge pull request #24554 from ingvagabund/dhodovska-events-flag-for-describers
Automatic merge from submit-queue

Introduce events flag for describers

Printing events for a given object is not always needed. Thus, introducing --show-events=false to ``kubectl describe`` to skip events printing.

Fixes: #24239
2016-05-08 14:41:28 -07:00
Janet Kuo 57c2a28b92 Clarify limit/requests flags in kubectl run 2016-05-06 16:32:43 -07:00
Jan Chaloupka dd2c9c578d Introduce kubectl describe --show-events
Introduce DescriberSettings for Describer display options
Introduce --show-events flag and DescriberSettings in Describer methods
Introduce unit-tests
Regenerated kubectl describe docs
Add events flag tests to test-cmd.sh

Signed-off-by: dhodovsk@redhat.com
Signed-off-by: jchaloup@redhat.com
2016-05-06 11:40:11 +02:00
k8s-merge-robot 53ea2cb444 Merge pull request #25074 from AdoHe/remove_container_args
Automatic merge from submit-queue

update kubectl apply help info

Please refer #22342 for more detail. @bgrant0607 ptal. Also I have open a PR to update docs on `kuberntes.github.io`
2016-05-04 14:44:14 -07:00
k8s-merge-robot 1642083e60 Merge pull request #24645 from jlowdermilk/rolling-update
Automatic merge from submit-queue

kubectl rolling-update support for same image

Fixes #23497.

Enables `kubectl rolling-update --image` to the same image, adding a `--image-pull-policy` flag to remove ambiguity. This allows rolling-update to behave as an "update and/or restart" (https://github.com/kubernetes/kubernetes/issues/23497#issuecomment-212349730), or as a forced update when the same tag can mean multiple versions (e.g. `:latest`). cc @janetkuo @nikhiljindal
2016-05-04 07:24:22 -07:00
AdoHe 036ac359d1 update kubectl apply help info 2016-05-03 22:50:24 -04:00
Andy Goldstein 8858d20044 Fix `kubectl create configmap` help
Remove "generic" from the help text, as that was an inadvertent carry-over from `kubectl create
secret generic`.
2016-04-29 16:31:24 -04:00
k8s-merge-robot ae5065a2c2 Merge pull request #24365 from janetkuo/remove-t-for-tty
Automatic merge from submit-queue

Add flag -t as shorthand for --tty

`-t` was deprecated in #12813 (Aug. 2015, about 6+ months ago). 

Now remove `--template`'s shorthand `-t` and create a shorthand `-t` for `--tty` in `kubectl run`. 

@kubernetes/kubectl
2016-04-28 00:23:11 -07:00
Jeff Lowdermilk 1baa473ef2 kubectl rolling-update support for same image 2016-04-25 09:20:15 -07:00
petervo 4f9d3ace5d kubectl: Allow []byte config fields to be set by the cli
Allows []byte config fields such as 'certificate-authority-data'
to be set using `kubectl config set` commands.
2016-04-22 15:53:24 -07:00
Janet Kuo aa2ac9b1d1 -t shorthand for --tty instead of --template 2016-04-15 17:12:42 -07:00
Marc Lough fdf409861a Drain pods created from ReplicaSets 2016-04-15 08:51:40 +01:00
Daniel Smith bbe5299371 Merge pull request #23798 from nak3/bash-completion
Bash completion updates
2016-04-14 16:59:48 -07:00
Daniel Smith a42d7fa31c Merge pull request #23756 from smarterclayton/force_delete
Add a client flag to delete "--now" for grace period 0
2016-04-14 16:55:07 -07:00
deads2k ac4c545b91 add act-as powers 2016-04-14 12:49:10 -04:00
Kenjiro Nakayama c9d34870ed Update bashcompletion codes for kubectl expose 2016-04-14 23:43:48 +09:00
Kenjiro Nakayama 84e3ee8ec4 Update bashcompletion codes for kubectl annotate 2016-04-14 23:40:34 +09:00
Clayton Coleman ea3467f822 Add a client flag for --now delete
Is equivalent to --grace-period=0 but is more intuitive for end users.
2016-04-07 23:45:08 -04:00
Fabiano Franz 9ddacfa25f Mark filename flags for completions 2016-04-01 16:14:36 -03:00
Brendan Burns be6c5b332b Add third party support to kubectl 2016-03-31 10:53:32 -07:00
k8s-merge-robot 9b6e4aa9b4 Merge pull request #23116 from metral/recursive-visit
Automatic merge from submit-queue

allow kubectl cmds to process files recursively, when given a dir

This PR accomplishes two things:

1. It creates a `--recursive` flag for use with certain `kubectl` commands that _currently_ do not process files beyond their first level of children, as seen in the issue https://github.com/kubernetes/kubernetes/issues/19767
2. It enables the ability to use the `--recursive` flag in the `kubectl` commands that currently _only_ support processing a directory up to its first level of children.
2016-03-30 05:07:47 -07:00
Dawn Chen c47f74a470 Merge pull request #23348 from pwittrock/docs
Update docs to reflect `kubectl run` creates deployments by default i…
2016-03-28 17:03:47 -07:00
Phillip Wittrock 4d2f3c1c17 Update docs to reflect `kubectl run` creates deployments by default instead of replicatino controllers. 2016-03-28 16:25:02 -07:00
Mike Metral 7403878ac0 allow kubectl cmd to process dirs recursively
reqs:
    - the kubectl cmd must support the -f | --filename flag
    - the kubectl cmd must support visiting a dir one level deep,
    or using more than one resource
2016-03-28 12:44:21 -07:00
Lucas Käldström 3507bf814f Add sa as a shorthand for serviceaccounts 2016-03-25 23:28:52 +02:00
Janet Kuo e93b855242 Update kubectl help for 1.2 resources 2016-03-22 14:14:35 -07:00
k8s-merge-robot b56252e338 Merge pull request #23161 from thockin/drain-help-typo
Auto commit by PR queue bot
2016-03-19 22:44:54 -07:00
Tim Hockin 1e5ce735fc Fix typo in help for kubectl drain 2016-03-19 20:42:51 -07:00
AdoHe 57534eaec9 update expose command description to add deployment 2016-03-19 13:51:21 -04:00
Madhusudan.C.S 67b70d7c89 Add a Deployment example for kubectl expose. 2016-03-18 17:05:49 -07:00
Brian Grant b7984b2fa7 Merge pull request #22862 from jlowdermilk/typo
fix typo in kubectl run help string
2016-03-11 12:26:48 -08:00
nikhiljindal 593b78f925 Deprecating --api-version flag 2016-03-11 10:12:44 -08:00
Jeff Lowdermilk 627615c870 fix typo in kubectl run help string 2016-03-11 10:11:14 -08:00
Maciej Szulik f27871e60d Added api discovery to kubectl run, based on which we decide which generators to use 2016-03-11 16:59:14 +01:00
Maciej Szulik de83631768 Added job/v1 generator to kubectl run 2016-03-10 19:56:57 +01:00
k8s-merge-robot 739285b146 Merge pull request #21265 from stevekuznetsov/skuznets/new-sa
Auto commit by PR queue bot
2016-03-01 01:14:06 -08:00
AdoHe 9cc668f7c6 update commented examples just remove $ 2016-02-29 09:41:09 -05:00
Steve Kuznetsov e5b696ee43 added 'kubectl create sa' to create serviceaccounts 2016-02-26 10:27:37 -05:00
Paul Morie 7a243cb615 Regen for kubectl create configmap 2016-02-18 21:25:31 -05:00
k8s-merge-robot 9dacc5b382 Merge pull request #21238 from AdoHe/kubectl_help_bug
Auto commit by PR queue bot
2016-02-15 19:16:39 -08:00
k8s-merge-robot 47acbd62ec Merge pull request #21099 from deads2k/extend-patch
Auto commit by PR queue bot
2016-02-15 14:49:02 -08:00
AdoHe 81103a07c2 fix --sort-by help bug 2016-02-14 22:31:13 -05:00
Janet Kuo 311385e76c Make deployment the default in kubectl run 2016-02-12 12:29:14 -08:00
deads2k 9f003f7db3 allow patch to handle multiple types 2016-02-12 11:12:09 -05:00
derekwaynecarr 06f26189f0 Update kubectl create subcommand to use printer flags 2016-02-11 15:37:47 -05:00
Madhusudan.C.S 293793cf0d Allow replica set to be exposed as a service and add kubectl command tests for replica sets. 2016-02-10 16:20:08 -08:00
k8s-merge-robot 6c5540baae Merge pull request #20232 from mml/daemonset-warn
Auto commit by PR queue bot
2016-02-05 23:12:51 -08:00