Commit Graph

371 Commits

Author SHA1 Message Date
John Gardiner Myers de191e2366 Pull "create sshpublickey" into its own subcommand 2021-07-24 08:59:56 -07:00
John Gardiner Myers de64d287f0 Replace "kops describe keypair" with "kops get keypair -oyaml" 2021-07-22 16:47:59 -07:00
John Gardiner Myers 1e4dee452e Implement completion for "kops get instances" 2021-07-22 14:15:09 -07:00
John Gardiner Myers 337377c163 Implement completion for "kops get instancegroups" 2021-07-22 13:57:13 -07:00
John Gardiner Myers 070aa2ef34 Apply suggestions from code review
Co-authored-by: Peter Rifel <rifelpet@users.noreply.github.com>
2021-07-21 20:41:02 -07:00
John Gardiner Myers abd95d14f4 Implement completion for "kops get clusters" 2021-07-19 14:58:41 -07:00
John Gardiner Myers c68da24d21 Implement completion for "kops get assets" 2021-07-19 14:10:43 -07:00
John Gardiner Myers c312c19dcb Implement completion for "kops get" 2021-07-19 13:52:55 -07:00
John Gardiner Myers e6ede8f4a9 Don't provision SSH key by default on AWS 2021-07-17 16:33:26 -07:00
John Gardiner Myers d572b2245d Implement completion for "kops toolbox instance-selector" 2021-07-15 23:37:54 -07:00
John Gardiner Myers 69b0117827 Implement completion for "kops toolbox template" 2021-07-15 22:59:14 -07:00
John Gardiner Myers bf12934709 Clean up "kops toolbox instance-selector" 2021-07-14 14:36:37 -07:00
John Gardiner Myers b517ba687d Implement completion for "kops toolbox dump" 2021-07-14 14:36:37 -07:00
John Gardiner Myers 14320fb3b5 Clean up "kops toolbox" 2021-07-14 14:36:36 -07:00
John Gardiner Myers 66024869a0 Implement "kops edit instancegroup --set" and "--unset" 2021-07-13 20:07:59 -07:00
John Gardiner Myers 8be10e96d0 Implement "kops edit cluster --set" and "--unset" 2021-07-13 20:07:24 -07:00
John Gardiner Myers 1f9f6fc8ce Clean up "kops replace" command 2021-07-13 13:00:32 -07:00
John Gardiner Myers 0167f689e3 Implement completion for "kops export kubeconfig" 2021-07-13 07:32:08 -07:00
John Gardiner Myers 3091b76ffc Clean up "kops export" 2021-07-13 07:32:08 -07:00
Kubernetes Prow Robot 46aafd55a8
Merge pull request #11980 from johngmyers/complete-edit
Implement completion for "kops edit" commands
2021-07-13 04:50:30 -07:00
John Gardiner Myers 3613695248 Fix use of pretty.Bash() 2021-07-12 20:38:47 -07:00
John Gardiner Myers 6eda65d9f7 Implement completion for "kops edit instancegroup" 2021-07-11 22:38:07 -07:00
John Gardiner Myers ea9678573e Implement completion for "kops edit cluster" 2021-07-11 22:10:43 -07:00
John Gardiner Myers b0b83ed125 Clean up "kops edit" 2021-07-11 22:07:02 -07:00
John Gardiner Myers 1c3947220e Add "kops trust keypair" command 2021-07-11 10:36:40 -07:00
Kubernetes Prow Robot 3a68dd63f7
Merge pull request #11970 from johngmyers/complete-delete
Implement completion for delete commands
2021-07-11 01:10:46 -07:00
John Gardiner Myers 5a2aac4cfd Add "all" variants of key rotation commands 2021-07-10 05:51:31 -07:00
John Gardiner Myers ea8cd3b758 Implement completion for "kops delete instancegroup" 2021-07-10 00:30:32 -07:00
John Gardiner Myers 56b57b5326 Implement completion for "kops delete instance" 2021-07-10 00:30:32 -07:00
John Gardiner Myers b16b742b05 Implement completion for "kops delete cluster" 2021-07-10 00:30:32 -07:00
John Gardiner Myers c864dc02ca Clean up "kops delete -f" 2021-07-10 00:30:31 -07:00
John Gardiner Myers 9cb7e75be5 Implement completion for "kops create instancegroup" 2021-07-08 12:26:14 -07:00
John Gardiner Myers ae9c7a66e7 Implement remaining completion for "kops create cluster" 2021-07-08 06:04:27 -07:00
John Gardiner Myers 6d16c13f24 Implement some completion for "kops create cluster" 2021-07-06 08:16:44 -07:00
John Gardiner Myers 13bfa283cf Implement completion for "kops create -f" 2021-07-06 07:36:54 -07:00
John Gardiner Myers abf8e268cd Implement completion for "kops upgrade cluster" 2021-07-05 11:26:33 -07:00
John Gardiner Myers dedf53fd16 Implement completion for "kops validate cluster" 2021-07-05 11:26:33 -07:00
John Gardiner Myers 4771f606a0 Implement completion for "kops update cluster" 2021-07-05 09:18:37 -07:00
John Gardiner Myers e7407b1b56 Clean up "kops version" 2021-07-05 09:18:37 -07:00
John Gardiner Myers 75f3974f47 Use all-caps for metasyntactic arguments 2021-07-03 23:00:41 -07:00
John Gardiner Myers e3451030ff Implement completion for "kops rolling-update cluster" 2021-07-03 22:57:15 -07:00
Kubernetes Prow Robot f66081b414
Merge pull request #11904 from johngmyers/get-keypairs-times
Improve "kops get keypairs"
2021-07-02 04:58:12 -07:00
John Gardiner Myers 52fd5ac51a Use Cobra's built-in completion command 2021-07-01 13:04:39 -07:00
John Gardiner Myers d0f20f367d Improve "kops get keypairs" 2021-07-01 08:05:07 -07:00
John Gardiner Myers ac1cf0b0ee Implement completion for "kops distrust keypair" 2021-06-30 21:25:47 -07:00
John Gardiner Myers d8e592c421 Implement completion for "kops promote keypair" 2021-06-29 19:47:05 -07:00
John Gardiner Myers 22b8ad2d48 Implement completion for "kops create keypair" 2021-06-28 23:26:47 -07:00
John Gardiner Myers 3caa6ef5b8 Improve "kops distrust keypair" command 2021-06-27 11:16:34 -07:00
John Gardiner Myers cd48f10de5 Rename "kops delete keypair" to "kops distrust keypair" 2021-06-24 19:19:43 -07:00
John Gardiner Myers 584aa56b6b Retain deleted keypairs 2021-06-24 19:03:29 -07:00
John Gardiner Myers 5423e18b56 Add 'kops promote keypair' command 2021-06-21 20:58:51 -07:00
John Gardiner Myers c904c743da Remove 'kops import' 2021-06-21 07:34:29 -07:00
John Gardiner Myers 002a1f7fd3 Remove 'kops toolbox convert-imported' 2021-06-21 07:34:29 -07:00
Kubernetes Prow Robot ab0ee8a2a9
Merge pull request #11823 from johngmyers/get-keypairs-2
Improve the output of 'kops get keypairs'
2021-06-21 02:19:10 -07:00
John Gardiner Myers 12d536d3a3 Refactor 'kops delete keypair' 2021-06-20 15:09:15 -07:00
John Gardiner Myers 3ca8b95005 Support creating new service-account keypairs 2021-06-20 14:09:24 -07:00
John Gardiner Myers 72ba687744 Split out get, describe, and delete keypairs commands 2021-06-19 13:36:11 -07:00
John Gardiner Myers af74e75382 Allow adding secondary keyset items 2021-06-18 10:41:37 -07:00
John Gardiner Myers 3793c92b94 Remove "secret" from "kops create secret keypair ca" 2021-06-18 10:36:19 -07:00
John Gardiner Myers 1356818d83 Make the AdminAccess default inclusive of IPv6 2021-06-14 21:51:17 -07:00
John Gardiner Myers 76fc012f96 Allow unsetting fields from the command line 2021-06-14 08:52:32 -07:00
John Gardiner Myers e0915887ed Move asset copying out of apply_cluster 2021-06-05 21:17:50 -07:00
John Gardiner Myers 326a4beb49 Don't describe CloudLabels as being AWS-specific 2021-06-01 23:32:22 -07:00
John Gardiner Myers 4c2508b6ec Add "kops get assets" command 2021-05-28 21:33:46 -07:00
John Gardiner Myers 3f24a29cca Change toolbox template flag for consistency 2021-05-27 20:42:16 -07:00
Ciprian Hacman 54961e4ae5 Create new clusters without forcing a container runtime
Decide which container runtime to use later in model, based on Kubernetes version and other settings.
2021-05-09 21:43:58 +03:00
Ciprian Hacman 6c284a886b Apply suggestions from code review 2021-04-15 11:42:27 +03:00
Eric Greer 21c6007e71 Update kops_create_secret_dockerconfig.md
Today we were implementing an authenticated docker user, but it was unclear how exactly to do that.  We learned that simply making this secret within kops was all that was needed for the docker config to start appearing on newly built nodes.  It would be nice if the documentation here reflected that.  It would have saved us some time.
2021-04-15 11:30:54 +03:00
Justin Santa Barbara e34d9bb579 Expand flag help on --user flags
It wasn't entirely clear to me that this had to be the name of a user
kubeconfig section.
2021-03-27 13:41:10 -04:00
Ole Markus With 20bd724f5e Add support for scaling out the control plane with dedicated apiserver nodes
Ensure apiserver role can only be used on AWS (because of firewalling)

Apply api-server label to CP as well

Consolidate node not ready validation message

Guard apiserver nodes with a feature flag

Rename Apiserver role to APIServer

Add an integration test for apiserver nodes

Rename Apiserver role to APIServer

Enumerate all roles in rolling update docs

Apply suggestions from code review

Co-authored-by: Steven E. Harris <seh@panix.com>
2021-03-20 20:57:00 +01:00
Barry Melbourne e30bf1cf35 Update Go modules to latest versions 2021-03-14 15:08:27 +00:00
Peter Rifel 2d8bfc040b
Allow SSH user to be overridden for `toolbox dump` 2021-01-28 19:47:22 -06:00
Kubernetes Prow Robot f055dd561c
Merge pull request #10593 from gabrieljackson/set-instancegroup-cmd-redux
Add `set instancegroup` command
2021-01-25 05:16:54 -08:00
Gabe Jackson b1282f2591 Correct command help text 2021-01-24 21:19:13 -05:00
Barry Melbourne 337c9c4c66 Set default container runtime to containerd 2021-01-16 14:55:35 +00:00
Gabe Jackson e90050f134 Add `set instancegroup` command
This change adds a new command and functionality for updating
instance group configuration via command line arguments. This
behavior mimics the `set cluster` command.
2021-01-15 12:19:26 -05:00
Ole Markus With 5fe948bb5c Add template function for preferred version 2020-12-15 08:53:30 +01:00
Kubernetes Prow Robot 0b5646e94a
Merge pull request #10266 from rifelpet/k8s120
Update k8s dependencies to 1.20.0-beta.2
2020-11-18 10:48:07 -08:00
Peter Rifel f78bf5bf5e
regenerate cli docs 2020-11-18 12:02:58 -06:00
Ciprian Hacman 3ca128d5ef make gen-cli-docs 2020-11-14 16:02:59 +02:00
axpraka 3033caa5e7 Update kops as kOps and remove extra spaces from .md files
- Updated kops as kOps in .md files.
- Remove extra spaces from .md files
2020-11-13 20:09:51 -05:00
John Gardiner Myers cddd30c184 Update validate cluster cli docs 2020-11-11 09:31:18 -08:00
Christian Joun e91ed11449
Implement API load balancer class with NLB and ELB support on AWS (#9011)
* refactor TargetLoadBalancer to use DNSTarget interface instead of LoadBalancer

* add LoadBalancerClass fields into api

* make api machinery

* WIP: Implemented API loadbalancer class, allowing NLB and ELB support on AWS for new clusters.

* perform vendoring related tasks and apply fixes identified from hack/

dissallow spotinst + nlb
remove reflection in status_discovery.go
Add precreated additional security groups to the Master nodes in case of NLB
Remove support for attaching individual instances to NLB; only rely on ASG attachments
Don't specify Classic loadbalancer in GCE integration test

* add utility function to the kops model context to make LoadBalancer comparisons simpler

* use DNSTarget interface when locating DNSName of API ELB

* wip: create target group task

* Consolidate TargetGroup tasks

* Use context helper for determining api load balancer type to avoid nil pointers

* Update NLB creation to use target group ARN from separate task rather than creating a TG in-line

* Address staticcheck and bazel failures

* Removing NLB Attachment tasks because they're not used since we switched to defining them as a part of the ASGs

* Address PR review feedback

* Only set LB Class field for AWS clusters, fix nil pointer

* Move target group attributes from NLB task to TG task, removing unused attributes

* Add terraform and cloudformation support for NLBs, listeners, and target groups

* Update integration test for NLB support

* Fix NLB name format to pass terraform validation

* Preserve security group rule names when switching ELB to NLB to reduce destructive terraform changes

* Use elbv2 enums and address some TODOs

* Set healthcheck values in target group

* Find TG tags, fix NLB name detection

* Fix more spurious changes reported by lifecycle integration test

* Fix spotinst validation, more code cleanup

* Address more PR feedback

* ReconcileTargetGroups unit test + more code simplification

* Addressing PR feedback Renaming task 1. awstasks.LoadBalancer -> awstasks.ClassicLoadBalancer

* Addressing PR feedback Renaming task: ELBName() -> CLBName() / LinkToELB() -> LinkToCLB()

* Addressing PR feedback: Various text changes

* fix export of kubecfg

* address TargetGroup should have the same name as the NLB

* should address error when fetching tags due to missing ARN

* Update expected and crds

* Add feature table to NLB docs

* Address more feedback and remove some TODOs that arent applicable anymore

* Update spotinst validation error message

Co-authored-by: Peter Rifel <pgrifel@gmail.com>
2020-11-02 05:28:52 -08:00
Ciprian Hacman 35d49a40a2 Update shell style for CLI docs for better compatibility 2020-10-28 18:23:23 +02:00
Ciprian Hacman f69ffeaa63 Update cluster and state store names in CLI docs 2020-10-28 18:22:53 +02:00
Justin SB e03bb72c2c Default to exporting a kubecfg, even without credentials
We do log a hint for the user when we have exported an empty kubecfg,
but this now supports the "current cluster" UX.

Issue #9990
2020-10-25 14:30:32 -04:00
Derrik Campau ca70ac2203 Fix small typo in create cluster help output
Fixes typo in cmd/kops/create_cluster.go and
docs/cli/kops_create_cluster.md where example output had filename.yamlh,
changed to filename.yaml
2020-09-26 14:45:03 -07:00
Ole Markus With c01455cf91 Keep the good part from last attempt 2020-09-01 08:30:03 +02:00
Justin SB 0cda0f5068 Support authentication helper for kubectl
We create a simple exec plugin command which can create and renew
short-lived admin credentials on the fly, essentially leveraging the
security of the underlying cloud credentials.

Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
2020-08-30 15:16:20 -04:00
Ole Markus With ff6c04938d Add kops delete instance command
Add support for deleting instance by k8s node name

Add yes flag
2020-08-28 08:43:30 +02:00
Peter Rifel d0b8c654bd
Add --internal flag for export kubecfg that targets the internal dns name
Kops creates an "api.internal.$clustername" dns A record that points to the master IP(s)

This adds a flag that will use that name and force the CA cert to be included.
This is a workaround for client certificate authentication not working on API ELBs with ACM certificates.
The ELB has a TLS listener rather than TCP, so the client certificate is not passed through to the apiserver.
Using --internal will bypass the API ELB so that the client certificate will be passed directly to the apiserver.
This also requires that the masters' security groups allow 443 access from the client which this does not handle automatically.
2020-08-26 21:15:18 -05:00
Peter Rifel 4d9f0128a3
Upgrade to klog2
This splits up the kubernetes 1.19 PR to make it easier to keep up to date until we get it sorted out.
2020-08-16 20:56:48 -05:00
Kubernetes Prow Robot ec8b47d725
Merge pull request #9593 from johngmyers/kubectl-lifetime
Reduce the lifetime of exported kubecfg credentials
2020-08-14 19:24:18 -07:00
Brandon Wagner c4e2497a8a change defaults 2020-08-11 15:40:54 -05:00
Brandon Wagner 2d6d7ec4ad update cli docs 2020-08-10 17:13:49 -05:00
Brandon Wagner 602564d26c use byte quantity flag instead of int MiBs for memory args 2020-08-10 16:16:51 -05:00
Brandon Wagner b4bc9b5d56 update cli docs for instance-selector 2020-08-10 16:16:51 -05:00
Brandon Wagner 9d9ca8441e feat toolbox instance-selector implementation 2020-08-10 16:16:51 -05:00
Kubernetes Prow Robot ea2d0da1cc
Merge pull request #8577 from justinsb/dump
Capture logs from a kops cluster
2020-08-09 17:18:19 -07:00
Peter Rifel 40a25bd8ba
Expose private key as a flag 2020-07-24 20:15:45 -05:00