Commit Graph

334 Commits (5b47f99164d76b6b043d7de2d3834abeda6685b0)

Author SHA1 Message Date
Antoine Pelisse e1eadc5031 Move `diff` command to root rather than alpha
New command is now `kubectl diff` rather than `kubectl alpha diff` since
it's moving out of alpha soon, and will be using dry-run apply to
produce the diff rather than the custom merge logic.
2018-09-27 13:11:43 -07:00
juanvallejo 4bdc636380
add updated plugin mechanism 2018-08-15 15:06:29 -04:00
David Eads 0d0863ea10 generated 2018-05-22 08:47:42 -04:00
Kubernetes Submit Queue 5e08ae0bf2
Merge pull request #61285 from soltysh/issue23276
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Deprecate kubectl rolling-update

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

/assign @juanvallejo @tnozicka 

**Release note**:
```release-note
Deprecate kubectl rolling-update 
```
2018-04-25 09:47:27 -07:00
Maciej Szulik 8237e1a034
Generated changes 2018-04-25 13:09:12 +02:00
Kubernetes Submit Queue 229d2df48a
Merge pull request #42873 from xilabao/add-apiresources-command
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add kubectl api-resources command

**What this PR does / why we need it**:
As the RBAC role need to be related to resources. I think we can use the command to get the supported resources. 

```
# ./cluster/kubectl.sh api-resources   
NAME                                  SHORTNAMES   APIGROUP                       NAMESPACED   KIND
bindings                                                                          true         Binding
componentstatuses                     cs                                          false        ComponentStatus
configmaps                            cm                                          true         ConfigMap
endpoints                             ep                                          true         Endpoints
events                                ev                                          true         Event
limitranges                           limits                                      true         LimitRange
namespaces                            ns                                          false        Namespace
nodes                                 no                                          false        Node
persistentvolumeclaims                pvc                                         true         PersistentVolumeClaim
persistentvolumes                     pv                                          false        PersistentVolume
pods                                  po                                          true         Pod
podtemplates                                                                      true         PodTemplate
replicationcontrollers                rc                                          true         ReplicationController
resourcequotas                        quota                                       true         ResourceQuota
secrets                                                                           true         Secret
serviceaccounts                       sa                                          true         ServiceAccount
services                              svc                                         true         Service
externaladmissionhookconfigurations                admissionregistration.k8s.io   false        ExternalAdmissionHookConfiguration
initializerconfigurations                          admissionregistration.k8s.io   false        InitializerConfiguration
customresourcedefinitions             crd          apiextensions.k8s.io           false        CustomResourceDefinition
apiservices                                        apiregistration.k8s.io         false        APIService
controllerrevisions                                apps                           true         ControllerRevision
daemonsets                            ds           apps                           true         DaemonSet
deployments                           deploy       apps                           true         Deployment
replicasets                           rs           apps                           true         ReplicaSet
statefulsets                          sts          apps                           true         StatefulSet
tokenreviews                                       authentication.k8s.io          false        TokenReview
localsubjectaccessreviews                          authorization.k8s.io           true         LocalSubjectAccessReview
selfsubjectaccessreviews                           authorization.k8s.io           false        SelfSubjectAccessReview
subjectaccessreviews                               authorization.k8s.io           false        SubjectAccessReview
horizontalpodautoscalers              hpa          autoscaling                    true         HorizontalPodAutoscaler
jobs                                               batch                          true         Job
certificatesigningrequests            csr          certificates.k8s.io            false        CertificateSigningRequest
daemonsets                            ds           extensions                     true         DaemonSet
deployments                           deploy       extensions                     true         Deployment
ingresses                             ing          extensions                     true         Ingress
networkpolicies                       netpol       extensions                     true         NetworkPolicy
podsecuritypolicies                   psp          extensions                     false        PodSecurityPolicy
replicasets                           rs           extensions                     true         ReplicaSet
networkpolicies                       netpol       networking.k8s.io              true         NetworkPolicy
poddisruptionbudgets                  pdb          policy                         true         PodDisruptionBudget
clusterrolebindings                                rbac.authorization.k8s.io      false        ClusterRoleBinding
clusterroles                                       rbac.authorization.k8s.io      false        ClusterRole
rolebindings                                       rbac.authorization.k8s.io      true         RoleBinding
roles                                              rbac.authorization.k8s.io      true         Role
podpresets                                         settings.k8s.io                true         PodPreset
storageclasses                        sc           storage.k8s.io                 false        StorageClass
```
**Which issue this PR fixes**: fixes https://github.com/kubernetes/kubernetes/issues/42932

**Special notes for your reviewer**:

**Release note**:

```release-note
add kubectl api-resources command to discovery of resources
```
2018-04-03 14:35:09 -07:00
xilabao 110641b34c add kubectl api-resources command 2018-03-09 17:47:17 +08:00
Edmund Rhudy 5b57c2db00
Fixes #47538: Add functionality for manually creating a Job instance from a CronJob
This changeset adds the command `kubectl create job` with the flag `--from-cronjob`, which allows a user to create a Job from a CronJob via the CLI.
2018-02-22 14:30:37 +01:00
wackxu 741c58be7f add create subcommand for priorityclass 2017-11-07 15:03:01 +08:00
Antoine Pelisse 14ec200e4e Add documentation for alpha diff 2017-10-23 17:05:23 -07:00
Kubernetes Submit Queue a3aac42b9a Merge pull request #51636 from deads2k/cli-01-reconcile
Automatic merge from submit-queue (batch tested with PRs 50832, 51119, 51636, 48921, 51712)

add reconcile command to kubectl auth

This pull exposes the RBAC reconcile commands through `kubectl auth reconcile -f FILE`.  When passed a file which contains RBAC roles, rolebindings, clusterroles, or clusterrolebindings, it will compute covers and add the missing rules.

The logic required to properly "apply" rbac permissions is more complicated that a json merge since you have to compute logical covers operations between rule sets.  This means that we cannot use `kubectl apply` to update rbac roles without risking breaking old clients (like controllers).

To solve this problem, RBAC created reconcile functions to use during startup for "stock" roles.  We want to offer this power to users who are running their own controllers and extension servers.

This is an intersection between @kubernetes/sig-auth-misc and @kubernetes/sig-cli-misc
2017-09-02 19:26:25 -07:00
David Eads aa637502e0 add reconcile command to kubectl auth 2017-08-30 16:04:00 -04:00
zhengjiajin abb71311cb Generated documentation for kubectl set env 2017-08-25 19:53:23 +08:00
chandanmad f3ac55725d Changes for updating serviceaccount of a resource. 2017-08-14 12:41:19 +05:30
Christoph Blecker ac86803a74
Remove docs/ other than auto generated 2017-06-01 23:10:47 -07:00
Kubernetes Submit Queue 1889d654f5 Merge pull request #46114 from arthur0/rename_context
Automatic merge from submit-queue (batch tested with PRs 46489, 46281, 46463, 46114, 43946)

Add `kubectl config rename-context`

Add `kubectl config rename-context`

This command allows renaming a context, instead of editing manually in .kubeconfig

Fix https://github.com/kubernetes/kubernetes/issues/45131

```release-note
Add `kubectl config rename-context`
```
2017-05-30 11:59:07 -07:00
Arthur Miranda 83fec5bafb Add `kubeclt config rename-context`
Enables renaming of a context via `kubectl`

Fix https://github.com/kubernetes/kubernetes/issues/45131
2017-05-26 15:49:30 -03:00
Shiyang Wang 4597658cb9 add `kubectl apply edit-last-applied` subcommand 2017-05-26 00:20:48 +08:00
Kubernetes Submit Queue 4e74c43e9a Merge pull request #43436 from xilabao/add-set-rolebinding-command
Automatic merge from submit-queue

add set rolebinding/clusterrolebinding command

add command to set user/group/serviceaccount in rolebinding/clusterrolebinding /cc @liggitt @deads2k
2017-05-05 07:21:58 -07:00
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
shiywang 03a58ceeaa Add --all support for view-last-applied 2017-04-21 08:45:30 +08:00
yupengzte bb656f97f1 Fix typo
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
2017-03-30 19:09:26 +08: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
Phillip Wittrock 74f3b754ce run hack/update-generated-docs.sh to strip munge tags 2017-02-16 10:17:17 -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
Wojciech Tyczynski c1699253ff Regenerate autogenerated files 2016-12-05 09:18:57 +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 2fd0b74bce regenerate kubectl certificate docs 2016-11-15 11:10:47 -08:00
Mike Danese 98e6d2c1e5 autogenerated 2016-11-08 06:33:46 -08:00
Tim Hockin 43d3824a9a Remove a few versioned-warnings that snuck in 2016-11-02 14:21:40 -07:00
Brendan Burns d65757fb88 add kubectl cp 2016-10-29 20:24:54 -07:00
Tim Hockin b0fa2056a6 Remove 'this is HEAD' warning on docs 2016-10-26 00:06:59 +02: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
Marcin Maciaszczyk d2a288de6a Remove kubectl namespace command 2016-09-22 15:46:20 +02:00
David McMahon 385fb81407 Update the latestReleaseBranch to release-1.4 in the munger. 2016-09-01 14:40:55 -07: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