Commit Graph

34 Commits

Author SHA1 Message Date
Rodrigo Menezes 74e8973c6c Fix based on Justins suggestion 2018-07-20 12:25:23 -07:00
Rohith 304d0ce8a9 - consuming the node authorization api spec in nodeup binary
- adding the options builder to fill in the model
- adding the spec into the bootstrap config
2018-07-06 20:14:35 +01:00
Justin Santa Barbara 45eeddb560 protokube: only specify etcd flags when managing etcd
If we're using etcd-manager, we don't need to pass the flags to protokube.
2018-06-14 17:40:51 -04:00
Rohith 516fa2348f File Path fixes
- nothing much here, just fixing up to use filepath.Join rather than strins.Join which is cleaner
2018-06-12 10:22:05 +01:00
Rohith cdfa45d1ca - fixing up the paths to use a strings.Join rather than a fiddly
fmt.Sprintf
2018-06-11 21:30:35 +01:00
Rohith e77000f138 - fixing up the variable name to following a more suitable convention 2018-06-11 21:23:04 +01:00
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
Rohith 67296c2db9 - fixing up the spelling mistakes found 2018-06-06 10:03:51 +01:00
AdamDang 918d510909
Typo fix: are be->are
are be->are
2018-06-01 08:54:36 +08:00
Rohith a140d5b7f1 - fixing the protokube flag issue 2018-02-24 10:03:43 +00:00
Rohith d065111453 Etcd TLS Peer & CLient Auth 2018-02-24 10:02:41 +00:00
Rohith c8e4a1caf8 Kubernetes Calico TLS
The current implementation when Etcd TLS was added does not support using calico as the configuration and client certificates are not present. This PR updates the calico manifests and adds the distribution of the client certificate
2018-02-14 23:41:45 +00:00
Justin Santa Barbara 9e5c086c5b Remove use of deprecated create-if-missing functions
Generally tightening up the interface to make it easier to remove list
operations.
2017-12-20 00:52:18 -05: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
chrislovecnm 0706c21dbc mounting kubectl from the host instead to copying it to protokube 2017-10-07 20:23:57 -06:00
Justin Santa Barbara df93d82bd8 Use IsKubernetesGTE helper instead of reparsing semver 2017-09-30 21:21:24 -04:00
Kubernetes Submit Queue 237514cf3a Merge pull request #3399 from justinsb/gce_repoint_assets
Automatic merge from submit-queue. .

GCE: move file assets to writeable location
2017-09-21 00:07:40 -07:00
Justin Santa Barbara 914fe68ee2 SecretStore and CAStore implementations backed by API
Not yet wired in
2017-09-17 23:01:13 -04:00
Justin Santa Barbara 2f6dc34704 GCE: move file assets to writeable location
On container OS, the /srv/kubernetes location is not writeable, so we
use /etc/srv/kubernetes instead.
2017-09-16 22:17:51 -04:00
Rohith 9873fc1be5 Requested Changes
- fixed the various issues highlighted in https://github.com/kubernetes/kops/pull/3125
- changed the docuementation to make more sense
- changed the logic of the UseSecureKubelet to return early
2017-08-08 13:47:08 +01: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 f61e1ebe08 Etcd TLS Options
- changed the location of this variable to be in the etcd cluster spec rather the kops cluster spec
- reflected the changes against the models
2017-08-06 20:50:05 +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
Rohith b5066c967b Vetting / Formating / Cleanup
- fixed any of the vettting / formatting issues that i'm came across on the update
- removed the commented out lines from the componentconfig as it make its increasingly difficult to find what is supported, what is not and the difference between them.
- added SerializeImagePulls, RegisterSchedulable to kubelet (by default they are ignored)
- added FeatureGates to the kube-proxy

Out of interest can someone point me to where these multi-versioned componentconfig are being used?
2017-07-28 17:16:11 +01: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 c6b4288e61 Pull fixes from the integration branch 2017-03-28 20:42:15 -04:00
Justin Santa Barbara e6fb0a3d67 Move kube-scheduler to code & RBAC 2017-03-28 00:26:59 -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 d561d33e60 Refactor kubelet to code
More splitting up the CoreOS PR
2017-01-18 21:53:52 -05:00
Justin Santa Barbara 515d4ddb21 Split out distros into its own package
Part of splitting up the coreos PR
2017-01-15 18:18:34 -05:00
Justin Santa Barbara 846b7601db Configure DockerVersion in Docker Spec
And automatically choose 1.12.3 for k8s >= 1.5, 1.11.2 for < 1.5

Fix #849
2016-12-20 00:34:40 -05:00