Commit Graph

41 Commits

Author SHA1 Message Date
Rohith d2bae64dd1 - adding the enable-bootstrap-token-auth to the kubeapi and fixing up the various compoents 2018-06-11 09:57:26 +01:00
Rohith 2d5bd2cfd9 - update the IAM policy to ensure the kubelet permision is skipped
- update the PKI to ensure on new clusters the certificate it not created
2018-06-11 09:57:26 +01:00
Rohith 4531384649 This PR attempts to solve two issues
a) The current implementation use's a static kubelet which doesn't not conform to the Node authorization mode (i.e. system:nodes:<nodename>)
b) As present the kubeconfig is static and reused across all the masters and nodes

The PR firstly introduces the ability for users to use bootstrap tokens and secondly when enabled ensure the kubelets for the masters as have unique usernames.  Note, this PR does not attempt to address the distribution of the bootstrap tokens themselves, that's for cluster admins. One solution for this would be a daemonset on the masters running on hostNetwork and reuse dns-controller to annotated the pods and give as the DNS

Notes:
- the master node do not use bootstrap tokens, instead given they have access to the ca anyhow, we generate certificates for each.
- when bootstrap token is not enabled the behaviour will stay the same; i.e. a kubelet configuration brought down from the store.
- when bootstrap tokens are enabled, the Nodes sit in a timeout loop waiting for the configuration to appear (by third party).
- given the nodeup docker and manifests builders are executed before the kubelet builder, the assumption here is a unit file kicks of a custom container to bootstrap the rest.
- the current firewalls on between the master and nodes are fairly open so no need to open ports between the two
- much of the work was ported from @justinsb PR [here](https://github.com/kubernetes/kops/pull/4134/)
- we add a very presumptuous server and client certificates for use with an authorizer (node-bootstrap-internal.dns_zone)

I do have an additional PR which performs the entire thing. The process being a node_authorizer which runs on the master nodes via a daemonset, the service implements a series of authorizers (i.e. alwaysallow, aws, gce etc). For aws, the process is similar to how vault authorizes nodes [here](https://www.vaultproject.io/docs/auth/aws.html). Nodeup no then calls out to the node_authorizer on bootstrap and provisions the kubelet.
2018-06-11 09:56:32 +01:00
Andrew Sy Kim 5004652505
Revert "digitalocean: don't set --cloud-provider=external on control plane starting v1.10" 2018-06-08 11:41:07 -04:00
Rohith 67296c2db9 - fixing up the spelling mistakes found 2018-06-06 10:03:51 +01:00
Justin Santa Barbara 53bf6ea6ad Replace deprecated flags: address -> insecure-bind-address 2018-05-31 23:23:33 -04:00
Ripta Pasay dfa4190cb5 Add --enable-admission-plugins API server flag, deprecating --admission-control in v1.10 2018-05-29 16:42:23 -07:00
k8s-ci-robot ad60dbd63d
Merge pull request #5178 from dims/patch-1
Add a FIXME and don't log about insecure ports
2018-05-26 14:22:41 -07:00
Davanum Srinivas 3e075fcab5
Add a FIXME and don't log about insecure ports
Thanks to @craigtracey for spotting this.
2018-05-25 09:35:06 -07:00
andrewsykim 2b325be8cf digitalocean: don't set --cloud-provider=external on control plane starting v1.10 2018-04-16 18:19:38 -04:00
Justin Santa Barbara 2bccf880d2 etcd-quorum-read flag: explicitly default to off for v2
Kubernetes 1.9 changed the default for etcd-quorum-read flag value to
true, in the hope of fixing some of the edge-case controller issues.

However, while this is cheap on etcd3, that fix was not backported to
etcd2, and performance there of quorum reads is poor.

For non-HA clusters with etcd2, it still goes through raft, but does not
need to - we set etcd-quorum-read to false, as this is just a missed
optimization in etcd2.

For HA clusters with etcd2, it's trickier, but at least for now we're
going to avoid the (crippling) performance regression.  kops 1.10 should
have etcd-manager (allowing upgrades to etcd3), and the ability to
configure IOPS on the etcd volume, so we can revisit this in 1.10 /
1.11.
2018-03-25 19:08:05 -04:00
Blake e37be9a88c Update list of AdmissionControllers for k8s 1.9 2018-01-18 13:40:23 -08:00
zengchen1024 f9c98c3b4c add openstack cloud provider 2017-11-13 16:59:24 +08:00
Kubernetes Submit Queue 8df13bd468 Merge pull request #3679 from justinsb/support_api_aggregation
Automatic merge from submit-queue.

Initial aggregation work

Create the keypairs, which are supposed to be signed by a different CA.
    
Set the `--requestheader-...` flags on apiserver.
    
Fix #3152
Fix #2691
2017-10-24 12:08:27 -07:00
Justin Santa Barbara a879521ba3 Initial aggregation support
Create the keypairs, which are supposed to be signed by a different CA.

Set the `--requestheader-...` flags on apiserver.

Fix #3152
Fix #2691
2017-10-22 14:41:38 -04:00
wlan0 d3143ec3cc add Cloud Controller Manager addon 2017-10-19 12:33:44 -07:00
Justin Santa Barbara 3478031533 API types changed package 2017-10-01 14:03:56 -04:00
Justin Santa Barbara 45032502c6 baremetal: fill out more of the baremetal mappings
This gets us to the point where we can create the objects.
2017-09-22 23:03:07 -04:00
Justin Santa Barbara 4d52a7c9e6 Add Initializers admission controller
Also sync up Admission controllers with current default sets for 1.7 &
1.8
2017-08-27 20:53:57 -04:00
georgebuckerfield 58960f39cd Move etcd config for apiserver into code, set cloud provider for Digital Ocean to external 2017-08-26 08:23:19 +01:00
georgebuckerfield ff7f60dc35 Initial work on moving apiserver templates into code 2017-08-26 00:32:28 +01:00
chrislovecnm 2afdb5ab2e mapping-and-uploading-kube-assets 2017-08-21 15:16:56 -06:00
Rohith 7cd214266a Requested Changes - Etvd v3
- removing the StorageType on the etcd cluster spec (sticking with the Version field only)
- changed the protokube flag back to -etcd-image
- users have to explicitly set the etcd version now; the latest version in gcr.io is 3.0.17
- reverted the ordering on the populate spec
2017-08-11 21:08:09 +01:00
Rohith f3e98af217 Etcd V3 Support
The current implementation is running v2.2.1 which is two year old and end of life. This PR add the ability to use etcd and set the versions if required. Note at the moment the image is still using the gcr.io registry image. As note, much like TLS their presently is not 'automated' migration path from v2 to v3.

- the feature is gated behine the storageType of the etcd cluster, bot clusters events and main must use the same storage type
- the version for v2 is unchanged and pinned at v2.2.1 with v2 using v3.0.17
- @question: we shoudl consider allowing the use to override the images though I think this should be addresses more generically, than one offs here and then. I know chris is working on a asset registry??
2017-08-11 21:04:31 +01:00
Chris Love 20535248b4 Merge pull request #2773 from justinsb/authn_integration
Initial support for authentication (kopeio)
2017-07-06 14:11:22 -06:00
Justin Santa Barbara 7c8dcc4a0d Code changes for 1.7 2017-07-02 13:10:28 -04:00
Justin Santa Barbara 752150ef22 Initial support for authentication (kopeio)
Still experimental, so not doing a flag yet.
2017-06-20 00:15:39 -04:00
chrislovecnm 9b4a86a616 tweak to log level 2017-05-19 20:19:05 -06:00
Justin Santa Barbara c9f412f0c8 Add authorization flag
Also add AlwaysAllow to the schema
2017-03-29 13:53:06 -04:00
Justin Santa Barbara 736a51d2ef Enable insecure port after all
Temporary workaround for
https://github.com/kubernetes/kubernetes/issues/43784 until we can find
a better solution.
2017-03-28 23:47:18 -04:00
Justin Santa Barbara 8b965a0ad9 Disable insecure port for apiserver
All components need a kubeconfig
2017-03-28 21:26:17 -04:00
Justin Santa Barbara 4c28bd30e4 Enable RBAC on 1.6 2017-03-28 20:14:13 -04:00
Justin Santa Barbara 533efb7c51 Add Authorization / RBAC option to schema 2017-03-28 15:28:54 -04:00
Justin Santa Barbara cb4641fea3 Code updates 2017-03-16 02:40:50 -04:00
Justin Santa Barbara 55b6d86454 Move more options to code
User reports of kubelet flags not being passed; moved more to code.

Also found & fixed the likely root-cause issue: we have two copies of
the cluster spec and were not being precise about which one we wanted to
use at all times.
2017-02-15 13:11:12 -05:00
Justin Santa Barbara 35f878c620 Resolve nodes by IP before trying by name
Fix #1556
2017-01-20 00:00:26 -05:00
Justin Santa Barbara 09cb9b654c Change int to int32 in API
We shouldn't be using the variable-sized int in the API
2017-01-15 18:23:44 -05:00
Justin Santa Barbara 09e834849d Specify storage-backend=etcd2 explicitly
The default may change to etcd3, but we want to stick with etcd2 until
upgrade has been fully vetted.
2017-01-04 11:27:31 -05:00
Justin Santa Barbara 3aae164d80 Only specify --configure-cbr0 when running with k8s <= 1.4 2016-12-27 21:09:06 -05:00
Justin Santa Barbara 132a001a40 Fixes per code review 2016-12-05 02:30:53 -05:00
Justin Santa Barbara d1ea4f969a Make sure we set APIServerCount
It looks like it got lost in a refactor.  Add a unit test, and move
initialization to code (and have the code self-check as well).

Also we can now have a fairly long code comment about the reasons why
this is such a mess...

Fix #371
2016-12-05 02:30:53 -05:00