Commit Graph

30 Commits

Author SHA1 Message Date
mooncake d75dc2745d Fix typos in files
Signed-off-by: mooncake <xcoder@tenxcloud.com>
2018-10-14 21:44:44 +08:00
Rodrigo Menezes 414b3a780b Rename hept.io authenticator to aws authenticator 2018-07-08 10:10:19 -07:00
Maciej Kwiek e1a0f4a73e Etcd TLS support for Cilium
Signed-off-by: Maciej Kwiek <maciej@covalent.io>
2018-06-20 14:27:24 +02: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
Rodrigo Menezes 5ce8f9e712 Setup heptio authenticator 2018-05-23 17:48:33 -07:00
Justin Santa Barbara 4d1abb7d87 Define KeysetFormat type, embed into keyset
The values are 'legacy' when not using keyset.yaml, and the API version
(v1alpha2) for keyset.yaml
2018-03-12 01:45:20 -04:00
chrislovecnm c13b952cd3 Updating legacy Keyset to newer Keyset API Objects
Creating the keypair.yaml file if it does not exist.

If the Keypair is not found kops creates a new keyset file.  We are
setting the Keyset Task Format to 'Keypair', which denotes that we do
not have a keypair.yaml file.

This commit enables upgrading from kops 1.8 -> 1.9 while upgrading an
existing cluster.  Clusters built with kops 1.8 do not have the keypair
file, and these code changes allow the creation of that file.
2018-03-09 13:14:25 -07: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 bf24a6443c Avoid ListSecrets call in nodeup
This helps up with GCE permissions, but also helps us get rid of auth
tokens.
2017-12-19 11:45:04 -05:00
pdh fc6f33db24 Allows additional Subject Alternate Names 2017-11-02 10:26:03 -07:00
Justin Santa Barbara fa419d9510 Add comment on purpose of kops keypair
Otherwise it's tricky to track down where it is used.
2017-10-30 23:49:19 -04: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
Justin Santa Barbara 559d885480 Mirror keystore & secretstore
This allows us to have our API objects in kops-server, but our
configuration on S3 or GCS.
2017-09-24 00:09:02 -04:00
Torin Sandall 7cf6e1036c Add support for proxy client certs
This enables external admission controller webhooks, api aggregation,
and anything else that relies on the
--proxy-client-cert-file/--proxy-client-key-file apiserver args.
2017-08-22 08:03:36 -07: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 74f59612c7 Fixes
- added the master option back the protokube, updating the nodeup model and protokube code
- removed any comments no related to the PR as suggested
- reverted the ordering of the mutex in the AWSVolumes in protokube
2017-08-06 18:52:38 +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
Justin Santa Barbara 3dfe48e5ae Wiring up lifecycle 2017-07-15 22:03:54 -04:00
Murali Reddy e872dbcb86 add support for kube-router as CNI networking provider
fixes #2606

Most part of the changes are similar to current supported CNI networking
provider. Kube-router also support IPVS bassed service proxy which can
be used as replacement for kube-proxy. So the manifest for kube-router
included with this patch enables kube-router to provide pod-to-pod
networking, IPVS based service proxy and ingress pod firewall.
2017-06-09 17:01:31 +05:30
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 c6b4288e61 Pull fixes from the integration branch 2017-03-28 20:42:15 -04:00
Justin Santa Barbara 4c28bd30e4 Enable RBAC on 1.6 2017-03-28 20:14:13 -04:00
Justin Santa Barbara ee9379f35e Add 127.0.0.1 to the IPs on the master apiserver 2017-03-28 18:11:26 -04:00
Justin Santa Barbara d6db014eca Create kube-proxy PKI certificate 2017-03-28 14:23:42 -04:00
Justin Santa Barbara e6fb0a3d67 Move kube-scheduler to code & RBAC 2017-03-28 00:26:59 -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