Commit Graph

441 Commits (2d36e9e8741e1a5500910af31dd6e8b14d0899d2)

Author SHA1 Message Date
fabriziopandini aa641ad5e3 autogenerated 2018-08-22 23:09:28 +02:00
juanvallejo 4bdc636380
add updated plugin mechanism 2018-08-15 15:06:29 -04:00
Lucas Käldström 7a87cf1c28
autogenerated 2018-06-06 23:41:10 +03:00
Lucas Käldström 7914dce526
autogenerated 2018-05-30 09:29:03 +03:00
Lubomir I. Ivanov ebc254c40f kubeadm: rename the `kube-dns` phases addon
The command `kubeadm alpha phases addon` has a property
called `kube-dns` which would install kube-dns, pre 1.11.

In the case of 1.11 this property will install CoreDNS,
because the property is also bound to the `CoreDNS` feature gate,
which is now `true` by default.

Fix that by renaming the property to `coredns`, updating the Cobra
info and also updating the unit tests.
2018-05-24 22:08:31 +03:00
Kubernetes Submit Queue f9c8898116
Merge pull request #64034 from deads2k/cli-62-wait
Automatic merge from submit-queue (batch tested with PRs 64034, 64072, 64146, 64059, 64161). 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 wait

Adds a `kubectl wait --for=[delete|condition=condition-name] resource/string` command.  This allows generic waiting on well behaved conditions and for a resource or set of resources to be deleted.

This was requested for delete to do foreground deletion

WIP because I need to add test cases.


@kubernetes/sig-cli-maintainers this is using a separation of concerns made possible by the genericclioptions to make an easily unit testable command.
@smarterclayton 

```release-note
adds a kubectl wait command
```
2018-05-22 19:20:12 -07:00
David Eads 0d0863ea10 generated 2018-05-22 08:47:42 -04:00
Lucas Käldström 60b0eeb2a4
autogenerated 2018-05-22 09:31:28 +03:00
Lucas Käldström 00390b6ec5
autogenerated 2018-05-18 00:55:01 +01:00
Kubernetes Submit Queue 2fda6e5e7a
Merge pull request #63930 from liztio/kubeadm-init-diff
Automatic merge from submit-queue (batch tested with PRs 63865, 57849, 63932, 63930, 63936). 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>.

Implement `kubeadm init diff`

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

Some users want to see the changes `kubeadm` woulda apply before actually running `kubeadm upgrade apply`. This shows the changes that will be made to the static pod manifests before applying them. This is a narrower case than `kubeadm upgrade apply --dry-run`, which specifically focuses on the static pod manifests.

**Which issue(s) this PR fixes**:
Part of [kubeadm/489](https://github.com/kubernetes/kubeadm/issues/489#issuecomment-388974795)

**Special notes for your reviewer**:

**Release note**:

```release-note
adds the `kubeadm upgrade diff` command to show how static pod manifests will be changed by an upgrade.
```
2018-05-17 00:28:26 -07:00
liz 618a110cd1
Generated docs 2018-05-16 15:23:40 -04:00
Chuck Ha 7ecab96dcd
Adds a kubeadm config images pull command
This command will use crictl or docker to pull images locally.

The dockerfall back is needed because in some cases the kubelet is not
yet running so there is no CRI dockershim socket available.

Fixes kubernetes/kubeadm#812

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-05-16 11:36:11 -04:00
Chuck Ha 63747e5c75
Refactor kubeadm config list-images
In preparation for creating a `kubeadm config images pull`
this commit refactors `kubeadm config list-images` into
`kubeadm config images list`.

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-05-14 16:51:04 -04:00
Chuck Ha f5e68814bf
Adds kubeadm images command
Closes kubernetes/kubeadm#388

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-05-10 12:15:55 -04:00
Kubernetes Submit Queue 923f6c54bb
Merge pull request #57224 from xiangpengzhao/kubeadm-phase-kubelet
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 phase command for dynamic kubelet configuration in kubeadm.

**What this PR does / why we need it**:
As the title says.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
partially fixes this: https://github.com/kubernetes/kubeadm/issues/571

**Special notes for your reviewer**:
/cc @luxas @fabriziopandini 
@kubernetes/sig-cluster-lifecycle-pr-reviews 

**Release note**:

```release-note
Phase `kubeadm alpha phase kubelet` is added to support dynamic kubelet configuration in kubeadm.
```
2018-04-16 18:02:11 -07: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
xiangpengzhao 087b772d5f Auto generated docs. 2018-03-08 10:59:25 +08:00
leigh schrandt 7a1a3aa3df Generate client certificates for healthchecking kubeadm etcd static pods
Add new phase command: `certs etcd-healthcheck`
Certs are placed at /etc/kubernetes/pki/etcd/healthcheck-client.{crt,key}
2018-03-04 19:25:16 -07:00
leigh schrandt 2d9b2d9fef Switch to a dedicated CA for kubeadm etcd identities 2018-02-27 17:42:43 -07:00
leigh schrandt 509e9af522 Update autogenerated docs 2018-02-23 17:05:44 -07: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
fabriziopandini 29d9a39e9f generated files 2017-11-21 09:53:01 +01:00
wackxu 741c58be7f add create subcommand for priorityclass 2017-11-07 15:03:01 +08:00
fabriziopandini 6c77e7fab6 generated-doc-placeholders 2017-10-27 10:03:51 +02: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
Kubernetes Submit Queue d5ab597eb3 Merge pull request #49935 from xiangpengzhao/remove-dep-alias
Automatic merge from submit-queue (batch tested with PRs 50806, 48789, 49922, 49935, 50438)

Remove deprecated kubectl command aliases

**What this PR does / why we need it**:
These command aliases have been deprecated for more than two years. It's time to remove them.

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

**Special notes for your reviewer**:
/sig cli

**Release note**:

```release-note
Remove deprecated kubectl command aliases `apiversions, clusterinfo, resize, rollingupdate, run-container, update`
```
2017-08-22 19:45:34 -07:00
shiywang d14660c271 remove deprecated command 'kubectl stop' 2017-08-16 08:34:44 +08:00
chandanmad f3ac55725d Changes for updating serviceaccount of a resource. 2017-08-14 12:41:19 +05:30
xiangpengzhao d6aca27b53 Remove deprecated kubectl command aliases 2017-08-02 03:08:48 -04:00
Tim Hockin a0db287299 Merge pull request #47934 from wlan0/master
enable docs and man page autogeneration for cloud-controller-manager
2017-06-30 16:58:08 -07:00
Kubernetes Submit Queue 1864a2403c Merge pull request #46151 from verb/kubectl-featuregate
Automatic merge from submit-queue

Add alpha command to kubectl

Also allow new commands to disable themselves by returning a nil value. This can be used to disable commands based on feature gates.

**What this PR does / why we need it**: Method of enabling alpha functionality in kubectl

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

**Special notes for your reviewer**: Part of a discussion in #45922 with @pwittrock

**Release note**:

```release-note
NONE
```
2017-06-23 05:00:35 -07:00
wlan0 38b060c4fd enable docs and man page autogeneration for cloud-controller-manager 2017-06-22 17:04:26 -07:00
Lee Verberne 01c7d129fb Create a kubectl alpha subcommand
Alpha commands can be added under `kubectl alpha` and are always
accessible (regardless of feature gates). If no alpha commands have been
defined then `alpha` is not displayed in `help`.
2017-06-16 07:09:21 +00:00
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
Alexander Campbell b7cc61816f docs: add new generated docs for deprecated commands 2017-05-22 14:22:48 -07: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
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