Commit Graph

56 Commits

Author SHA1 Message Date
John Gardiner Myers be8933b577 Remove code for unsupported features 2021-08-28 13:49:55 -07:00
John Gardiner Myers 0e25ceaadd Change "kubernetes-ca" to have that in the CN 2021-07-09 00:12:30 -07:00
John Gardiner Myers 7c9e7e9286 Make Lifecycle field non-pointer 2021-06-02 23:02:16 -07:00
Peter Rifel efef53cb2a
Add more lifecycles to HasLifecycle tasks 2021-06-01 23:08:49 -05:00
John Gardiner Myers a99ce3241a Set Lifecycle in PKIModelBuilder 2021-05-31 10:39:33 -07:00
John Gardiner Myers fdc61b4bdb Rename the service account key 2021-04-11 08:11:27 -07:00
John Gardiner Myers 2ac17bee69 Remove code for no-longer-supported k8s releases 2020-10-29 16:45:53 -07:00
Ciprian Hacman d0349fd6bb Open etcd port only when Calico uses "etcd" datastore 2020-10-09 09:33:38 +03:00
John Gardiner Myers b6947ccaee Use kops-controller to issue kube-router cert 2020-08-16 23:40:38 -07:00
John Gardiner Myers 8e43c1d637 Use kops-controller to issue kube-proxy cert 2020-08-16 23:36:42 -07:00
John Gardiner Myers c5871df319 Get kubelet certificate from kops-controller 2020-08-15 10:30:20 -07:00
John Gardiner Myers a45b07c156 Reduce the lifetime of exported kubecfg credentials 2020-07-17 22:39:01 -07:00
John Gardiner Myers 70926d43fc Use a stable key for signing service account tokens 2020-07-11 13:18:50 -07:00
John Gardiner Myers f4f4763dc2 Refactor more certs to be issued by nodeup 2020-06-28 23:12:13 -07:00
John Gardiner Myers c8b523e8b6 Issue aws-iam-authenticator cert in nodeup 2020-06-16 21:05:11 -07:00
John Gardiner Myers 9d7a93e124 Issue kubelet-api cert in nodeup 2020-06-13 16:35:44 -07:00
John Gardiner Myers 0f77055f63 Issue kops cert in nodeup 2020-06-11 23:54:59 -07:00
John Gardiner Myers d8970b93e1 Issue kube-controller-manager cert in nodeup 2020-06-09 22:45:19 -07:00
John Gardiner Myers b0694300df Issue kube-scheduler cert in nodeup 2020-06-09 20:23:33 -07:00
ZouYu 2fc52ec6be fix some go-lint warning
Signed-off-by: ZouYu <zouy.fnst@cn.fujitsu.com>
2020-06-09 08:52:50 +08:00
John Gardiner Myers 8a6d29cd40 Remove support for reading legacy-format keypairs 2020-05-20 13:28:13 -07:00
Maciej Kwiek 74e10dadec Change Cilium templates to standalone version
This commit doesn't include any Cilium configuration, just takes the
quick install yaml from
https://github.com/cilium/cilium/blob/v1.6.0/install/kubernetes/quick-install.yaml

Signed-off-by: Maciej Kwiek <maciej@isovalent.com>
2019-09-12 17:23:50 +02:00
mikesplain 9e55b8230a Update copyright notices
Also cleans some white spaces
2019-09-09 14:47:51 -04:00
Justin SB 810c65eb46
Copy well-known users from apiserver
This should eliminate the dependency on k8s.io/apiserver
2019-08-31 08:50:09 -07:00
Justin SB 31f408c978
Support etcd-manager in kops 1.12
In 1.12 (kops & kubenetes):

* We default etcd-manager on
* We default to etcd3
* We default to full TLS for etcd (client and peer)
* We stop allowing external access to etcd
2019-03-14 23:13:06 -04:00
Justin Santa Barbara 3405ee1382 Create separate certificate for etcd peer authentication
This works around the (very unusual) etcd changes for validation of
peer certificates by DNS lookup, which were introduced in etcd 3.2.

Issue #6024
2018-11-24 22:26:52 -05:00
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