Commit Graph

30 Commits

Author SHA1 Message Date
Ciprian Hacman d08c94e54e azure: Use `kops` as the default admin user 2025-07-21 07:00:07 +03:00
Ciprian Hacman 3597bddeaf Fix vet error 2023-11-04 05:57:08 +02:00
John Gardiner Myers 7c3e32369a Refactor Context into separate cloudup and nodeup types 2022-12-17 17:42:46 -08:00
Ole Markus With df2f66e1e5 Make API servers provision themselves.
API servers also have access to secret store, so there is no need to go through kops-controller.
This lets API server only depend on etcd from the CP nodes, which should make it easier to scale out API servers under pressure
2021-04-23 06:59:15 +02:00
Justin Santa Barbara 78b139465c Refactor and centralize distribution logic
Use of a struct makes it more sustainable, centralizing into the
distribution package makes it simpler to follow.
2021-01-05 11:50:23 -05:00
Justin SB b17e44b709 Recognize ubuntu 20.10
Teach nodeup about ubuntu 20.10, including the unusual
/etc/resolv.conf configuration.
2021-01-05 10:53:40 -05:00
Ciprian Hacman 22ec1512dc Use numbers for distribution names 2020-08-17 07:25:43 +03:00
Ciprian Hacman e68ee80a93 Move and rename the "distros" package 2020-08-17 07:25:43 +03:00
Peter Rifel 4d9f0128a3
Upgrade to klog2
This splits up the kubernetes 1.19 PR to make it easier to keep up to date until we get it sorted out.
2020-08-16 20:56:48 -05:00
John Gardiner Myers 87010c9c9b Issue kubecfg cert in nodeup 2020-06-11 23:54:56 -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 06c6ac1bee Remove support for CoreOS and Jessie 2020-05-04 23:09:52 -07:00
Kashif Saadat d09717dca8 Update default user for CoreOS, Flatcar for kubecfg 2020-03-26 10:04:46 +00:00
Ciprian Hacman 53c07fff3f Update default users for kubeconfig with supported distros 2020-03-25 19:04:17 +02:00
mikesplain 9e55b8230a Update copyright notices
Also cleans some white spaces
2019-09-09 14:47:51 -04:00
Jesse Haka 60756136c8 Add Debian 10 (buster) support 2019-05-26 15:34:39 +03:00
Justin SB 3e33ac7682
Change code from glog to klog
We don't call klog.InitFlags yet, because that will cause a flag
redefinition error until we get everyone to stop using glog.  That
will happen when we update to k8s 1.13.
2019-05-06 12:54:51 -04:00
Justin SB 8835dc94eb
Install kubelet config for default centos user
We weren't installing it on centos, which is not particuarly
user-friendly.
2019-02-19 21:24:24 -05:00
Rohith c9db958696 - cleanup up elements, imports and comments 2018-06-20 09:26:31 +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
Justin Santa Barbara 743e482660 nodeup: create kubeconfig under admin or root
While the admin account is created on stock debian images, it isn't on
all of them.  Check admin first, then check root, and don't treat it as
an error if neither is found - this is only a convenience.
2017-12-15 01:29:48 -05:00
Justin Santa Barbara 6a7c109f43 fix typo in comment: mananging 2017-10-30 23:47:59 -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 6059fdf9cb Debian 9 (stretch) support
Recognize debian 9 and map docker on it
2017-09-30 10:24:34 -04: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
chrislovecnm 56e11e0750 fixing directory perms 2017-05-17 19:36:08 -06:00
Jaipradeesh Janarthanan 16c7a36b20 [Fixes #2466] Creates .kube dir at /home/admin with group/owner as admin
Signed-off-by: Jaipradeesh Janarthanan <jaipradeesh@gmail.com>
2017-05-08 12:30:54 +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 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 1bacf8271e Initial (experimental) CoreOS support
* Detect CoreOS
* Move key manifests to code, to tolerate read-only mounts
* Misc refactorings so more code can be shared
* Change lots of ints to int32s in the models
* Run nodeup as a oneshot systemd service, rather than relying on
cloud-init behaviour which varies across distros
2017-02-11 13:57:30 -03:00