Commit Graph

29 Commits

Author SHA1 Message Date
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
Simone Sciarrati e406dbf501 Bind the kubelet to the local ipv4 address if the cni plugin is AmazonVPC - #4218 2018-03-01 17:47:54 +01:00
Justin Santa Barbara 3b983dfabd gce: mounter asset has moved
The mounter asset is now available directly, no longer in
kubernetes-manifests.tar.gz
2018-01-07 17:07:54 -05:00
Justin Santa Barbara 7c695e7d00 Rename flag from network-plugin-dir -> cni-bin-dir
Per https://github.com/kubernetes/kubernetes/pull/53564
2017-10-23 00:54:37 -04:00
Justin Santa Barbara af6a7ef4d8 Containerized mounter fixes per code review 2017-10-08 11:41:09 -04:00
Justin Santa Barbara 3a38d05385 GCE: install containerized mounter on COS
The containerized mounter is a little tricky to install, with lots of
bind mounts.  This code path is only hit on GCE though.
2017-10-08 11:12:37 -04:00
Justin Santa Barbara 3478031533 API types changed package 2017-10-01 14:03:56 -04:00
Justin Santa Barbara df93d82bd8 Use IsKubernetesGTE helper instead of reparsing semver 2017-09-30 21:21:24 -04:00
Blake e845e240ef Fixes reading /root/.docker/config.json on debian
Debian and probably others apparently don't automatically default to using the root account if it's not specified.
2017-08-14 13:08:30 -07:00
Rohith 2fb60b9b3d Kubelet API Certificate
A while back options to permit secure kube-apiserver to kubelet api was https://github.com/kubernetes/kops/pull/2831 using the server.cert and server.key as testing grouns. This PR formalizes the options and generates a client certificate on their behalf (note, the server{.cert,key} can no longer be used post 1.7 as the certificate usage is checked i.e. it's not using a client cert). The users now only need to add anonymousAuth: false to enable secure api to kubelet. I'd like to make this default to all new builds i'm not sure where to place it.

- updated the security.md to reflect the changes
- issue a new client kubelet-api certificate used to secure authorize comms between api and kubelet
- fixed any formatting issues i came across on the journey
2017-08-08 01:11:09 +01:00
Rohith a73d255b03 Etcd TLS Options
The current implementation does not put any transport security on the etcd cluster. The PR provides and optional flag to enable TLS the etcd cluster

- cleaned up and fixed any formatting issues on the journey
- added two new certificates (server/client) for etcd peers and a client certificate for kubeapi and others perhaps (perhaps calico?)
- disabled the protokube service for nodes completely is not required; note this was first raised in https://github.com/kubernetes/kops/pull/3091, but figured it would be easier to place in here given the relation
- updated protokube codebase to reflect the changes, removing the master option as its no longer required
- added additional integretion tests for the protokube manifests;
- note, still need to add documentation, but opening the PR to get feedback
- one outstanding issue is the migration from http -> https for preexisting clusters, i'm gonna hit the coreos board to ask for the best options
2017-08-06 17:06:46 +01:00
Blake bd779e7570 Move task up so so it applies to all nodes
Add HOME=/root to kubelet sysconfig
2017-07-29 13:04:49 -07:00
Justin Santa Barbara 1909b88097 Pass --network-plugin-dir for kubenet
kubenet continues to look there rather than --cni-bin-dir
2017-04-10 10:01:45 -04:00
Justin Santa Barbara 391a9b1897 Replaces UsesCNI with logic 2017-04-10 00:07:40 -04:00
Justin Santa Barbara a5e2d7f79e Fix CNI bin & conf paths
Stop using the networking-plugin-dir flag, and replace with the
cni-bin-dir and cni-conf-dir flags, set appropriately.

Thanks for spotting @prachetasp

Issue #2267
2017-04-06 01:21:35 -04:00
Justin Santa Barbara ba1af6950e Tidy up kubelet nodeup tests 2017-04-06 00:18:43 -04:00
chrislovecnm 131bc77abb Adding feature gates flag for kubelet, and unit tests 2017-04-03 11:13:21 -06:00
Justin Santa Barbara 4c28bd30e4 Enable RBAC on 1.6 2017-03-28 20:14:13 -04:00
Justin Santa Barbara c4e05ca1b1 Fix taint format 2017-03-28 12:26:10 -04:00
Justin Santa Barbara e6fb0a3d67 Move kube-scheduler to code & RBAC 2017-03-28 00:26:59 -04:00
Justin Santa Barbara 4006741a5d Update for new taints / labels names 2017-03-27 23:13:39 -04:00
Justin Santa Barbara 86d544c2f3 Update protokube to make tainting optional
As of 1.6, kubelet can apply the taints, so we don't need to do it in
protokube.
2017-03-27 23:08:15 -04:00
Justin Santa Barbara b9204e9911 Initial Container-Optimized OS support
Add initial support for google's container-optimized OS (available on
GCE).
2017-03-20 23:47:37 -04:00
Justin Santa Barbara 3d14d07616 Support cloud-config on GCE 2017-02-28 20:08:03 -05:00
Justin Santa Barbara 645f330dad Re-enable GCE support
We move everything to the models.  We feature-flag it, because we
probably want to change the names etc, and we aren't going to be able to
offer smooth upgrades until that is done.
2017-02-28 20:08:03 -05:00
Michael Taufen c24a017ed5 use --kubeconfig on kubelet instead of --api-servers in post 1.6 clusters 2017-02-27 15:49:11 -08:00
Justin Santa Barbara 4557ee7b9e Add socat to CoreOS
We build a statically linked version and distribute it with kops.

Note that our version of socat does not include libssl, but kubernetes
does not use it anyway.
2017-02-24 01:24:25 -05:00
Justin Santa Barbara d561d33e60 Refactor kubelet to code
More splitting up the CoreOS PR
2017-01-18 21:53:52 -05:00