210 Commits

Author SHA1 Message Date
Dalton Hubble
082921d679 Update Kubernetes from v1.14.2 to v1.14.3
* https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.14.md#v1143
v0.14.0
2019-05-31 01:05:00 -07:00
Dalton Hubble
efd1cfd9bf Update CoreDNS from v1.3.1 to v1.5.0
* Add `ready` plugin and change the readinessProbe to check
default port 8181 to ensure all plugins are ready
* `upstream [ADDRESS]` defines upstream resolvers for external
services. If no address is given, resolution is against CoreDNS
itself, which is the default. So `upstream` can be removed
2019-05-27 00:07:59 -07:00
Dalton Hubble
85571f6dae Update Kubernetes from v1.14.1 to v1.14.2
* https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.14.md#v1142
2019-05-17 13:00:30 +02:00
Dalton Hubble
eca7c49fe1 Update Calico from v3.7.0 to v3.7.2
* https://docs.projectcalico.org/v3.7/release-notes/
2019-05-17 12:26:02 +02:00
Dalton Hubble
42b9e782b2 Update kube-router from v0.3.0 to v0.3.1
* kube-router is experimental and not supported
* https://github.com/cloudnativelabs/kube-router/releases/tag/v0.3.1
2019-05-17 12:20:23 +02:00
Dalton Hubble
fc7a6fb20a Change flannel port from 8472 to 4789
* Change flannel port from the kernel default 8472 to the
IANA assigned VXLAN port 4789
* Requires a change to firewall rules or security groups
depending on the platform (**action required!**)
* Why now? Calico now offers its own VXLAN backend so
standardizing on the IANA port simplifies configuration
* https://github.com/coreos/flannel/blob/master/Documentation/backends.md#vxlan
2019-05-06 21:23:08 -07:00
Dalton Hubble
b96d641f6d Update Calico from v3.6.1 to v3.7.0
* Accept a `network_encapsulation` variable to choose whether the
default IPPool should use ipip (default) or vxlan encapsulation
* Use `network_mtu` as the MTU for workload interfaces for ipip
or vxlan (although Calico can have a IPPools with a mix, we're
picking ipip xor vxlan)
2019-05-05 20:41:53 -07:00
Dalton Hubble
614defe090 Update kube-router from v0.2.5 to v0.3.0
* https://github.com/cloudnativelabs/kube-router/releases/tag/v0.3.0
* Recall, kube-router is experimental and not vouched for
as part of clusters
2019-05-04 11:38:19 -07:00
Dalton Hubble
a80eed2b6a Update Kubernetes from v1.14.0 to v1.14.1 2019-04-09 21:43:39 -07:00
Dalton Hubble
53b2520d70 Remove deprecated user-kubeconfig output
* Use kubeconfig-admin output instead
* https://github.com/poseidon/terraform-render-bootkube/pull/100
2019-04-09 21:41:26 -07:00
Dalton Hubble
feb6e4cb3e Fix a few ca_cert vars that are lists and should be strings
* Error introduced in prior commit #104
2019-04-07 11:59:33 -07:00
Dalton Hubble
88fd15c2f6 Remove support for using a pre-existing certificate authority
* Remove the `ca_certificate`, `ca_key_alg`, and `ca_private_key`
variables
* Typhoon does not plan to expose custom CA support. Continuing
to support it clutters the implementation and security auditing
* Using an existing CA certificate and private key has been
supported in terraform-render-bootkube only to match bootkube
2019-04-07 11:42:57 -07:00
Dalton Hubble
b9bef14a0b Add enable_aggregation option (defaults to false)
* Add an `enable_aggregation` variable to enable the kube-apiserver
aggregation layer for adding extension apiservers to clusters
* Aggregation is **disabled** by default. Typhoon recommends you not
enable aggregation. Consider whether less invasive ways to achieve
your goals are possible and whether those goals are well-founded
* Enabling aggregation and extension apiservers increases the attack
surface of a cluster and makes extensions a part of the control plane.
Admins must scrutinize and trust any extension apiserver used.
* Passing a v1.14 CNCF conformance test requires aggregation be enabled.
Having an option for aggregation keeps compliance, but retains the stricter
security posture on default clusters
2019-04-07 02:27:40 -07:00
Dalton Hubble
a693381400 Update Kubernetes from v1.13.5 to v1.14.0 2019-03-31 17:45:25 -07:00
Dalton Hubble
bcb015e105 Update Calico from v3.6.0 to v3.6.1
* https://docs.projectcalico.org/v3.6/release-notes/
2019-03-31 17:41:15 -07:00
Dalton Hubble
da0321287b Update hyperkube from v1.13.4 to v1.13.5
* https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.13.md#v1135
2019-03-25 21:37:15 -07:00
Dalton Hubble
9862888bb2 Reduce calico-node CPU request from 250m to 150m
* calico-node uses only a small fraction of its CPU request
(i.e. reservation) even under stress. The unbounded limit
already allows usage to scale favorably in bursty cases
* Motivation: On instance types that skew memory-optimized
(e.g. GCP n1), over-requesting can push the system toward
overcommitment (alerts can be tuned)
* Overcommitment is not necessarily bad, but 250m seems too
generous a minimum given the actual usage
2019-03-24 11:55:56 -07:00
Dalton Hubble
23f81a5e8c Upgrade Calico from v3.5.2 to v3.6.0
* Add calico-ipam CRDs and RBAC permissions
* Switch IPAM from host-local to calico-ipam!
  * `calico-ipam` subnets `ippools` (defaults to pod CIDR) into
`ipamblocks` (defaults to /26, but set to /24 in Typhoon)
  * `host-local` subnets the pod CIDR based on the node PodCIDR
field (set via kube-controller-manager as /24's)
* Create a custom default IPv4 IPPool to ensure the block size
is kept at /24 to allow 110 pods per node (Kubernetes default)
* Retaining host-local was slightly preferred, but Calico v3.6
is migrating all usage to calico-ipam. The codepath that skipped
calico-ipam for KDD was removed
*  https://docs.projectcalico.org/v3.6/release-notes/
2019-03-18 22:28:48 -07:00
Dalton Hubble
6cda319b9d Revert "Update Calico from v3.5.2 to v3.6.0"
* Calico is not using host-local IPAM as desired
* This reverts commit e6e051ef47.
2019-03-18 21:32:23 -07:00
Dalton Hubble
e6e051ef47 Update Calico from v3.5.2 to v3.6.0
* Add calico-ipam CRDs and RBAC permissions
* Continue using host-local IPAM
*  https://docs.projectcalico.org/v3.6/release-notes/
2019-03-18 21:03:27 -07:00
Dalton Hubble
1528266595 Resolve in-addr.arpa and ip6.arpa zones with CoreDNS kubernetes plugin
* Resolve in-addr.arpa and ip6.arpa DNS PTR requests for Kubernetes
service IPs and pod IPs
* Previously, CoreDNS was configured to resolve in-addr.arpa PTR
records for service IPs (but not pod IPs)
2019-03-04 22:33:21 -08:00
Dalton Hubble
953521dbba Update hyperkube from v1.13.3 to v1.13.4
* https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.13.md#v1134
2019-02-28 22:22:35 -08:00
Dalton Hubble
0a7c4fda35 Update Calico from v3.5.1 to v3.5.2
* https://docs.projectcalico.org/v3.5/releases/
2019-02-25 21:20:47 -08:00
Dalton Hubble
593f0e3655 Add a readinessProbe to CoreDNS
* https://github.com/kubernetes/kubernetes/pull/74137
2019-02-23 13:11:19 -08:00
Dalton Hubble
c5f5aacce9 Assign Pod Priority Classes to control plane components
* Priority Admission Controller has been enabled since Typhoon
v1.11.1
* Assign cluster and node components a builtin priorityClassName
(higher is higher priority) to inform scheduler prepemption,
scheduling order, and node out-of-resource eviction order
2019-02-17 17:12:46 -08:00
Dalton Hubble
4d315afd41 Update Calico from v3.5.0 to v3.5.1
* https://github.com/projectcalico/confd/pull/205
2019-02-09 11:45:38 -08:00
Dalton Hubble
c12a11c800 Update hyperkube from v1.13.2 to v1.13.3
* https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.13.md#v1133
2019-02-01 23:23:07 -08:00
Dalton Hubble
1de56ef7c8 Update kube-router from v0.2.4 to v0.2.5
* https://github.com/cloudnativelabs/kube-router/releases/tag/v0.2.5
2019-02-01 23:21:58 -08:00
Dalton Hubble
7dc8f8bf8c Switch CoreDNS to use the forward plugin instead of proxy
* Use the forward plugin to forward to upstream resolvers, instead
of the proxy plugin. The forward plugin is reported to be a faster
alternative since it can re-use open sockets
* https://coredns.io/explugins/forward/
* https://coredns.io/plugins/proxy/
* https://github.com/kubernetes/kubernetes/issues/73254
2019-01-30 22:19:13 -08:00
Dalton Hubble
c5bc23ef7a Update flannel from v0.10.0 to v0.11.0
* https://github.com/coreos/flannel/releases/tag/v0.11.0
2019-01-29 21:48:47 -08:00
Dalton Hubble
54f15b6c8c Update Calico from v3.4.0 to v3.5.0
* https://docs.projectcalico.org/v3.5/releases/
2019-01-27 16:25:57 -08:00
Dalton Hubble
7b06557b7a Reduce kube-controller-manager --pod-eviction-timeout to 1m
* Pods on preempted nodes should be moved to healthy nodes
more quickly (1 min instead of 5 minutes)
2019-01-27 16:20:01 -08:00
Dalton Hubble
ef99293eb2 Update CoreDNS from v1.3.0 to v1.3.1
* https://coredns.io/2019/01/13/coredns-1.3.1-release/
2019-01-15 21:22:40 -08:00
Dalton Hubble
e892e291b5 Restore Kubelet authorization to delete nodes
* Fix a regression caused by lowering the Kubelet TLS client
certificate to system:nodes group (#100) since dropping
cluster-admin dropped the Kubelet's ability to delete nodes.
* On clouds where workers can scale down (manual terraform apply,
AWS spot termination, Azure low priority deletion), worker shutdown
runs the delete-node.service to remove a node to prevent NotReady
nodes from accumulating
* Allow Kubelets to delete cluster nodes via system:nodes group. Kubelets
acting with system:node and kubelet-delete ClusterRoles is still an
improvement over acting as cluster-admin
2019-01-14 23:26:41 -08:00
Dalton Hubble
2353c586a1 Update kube-router from v0.2.3 to v0.2.4
* https://github.com/cloudnativelabs/kube-router/releases/tag/v0.2.4
2019-01-12 14:19:36 -08:00
Dalton Hubble
bcbdddd8d0 Update hyperkube from v1.13.1 to v1.13.2
* https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.13.md#v1132
2019-01-11 23:59:24 -08:00
Dalton Hubble
f1e69f1d93 Re-enable kube-scheduler and kube-controller-manager HTTP ports
* Fix regression added in 48730c0f12, allow Prometheus to scrape
metrics from kube-scheduler and kube-controller-manager
2019-01-11 23:52:57 -08:00
Dalton Hubble
48730c0f12 Probe kube-scheduler and kube-controller-manager HTTPS ports
* Disable kube-scheduler and kube-controller-manager HTTP ports
2019-01-09 20:50:57 -08:00
Dalton Hubble
0e65e3567e Enable certificates.k8s.io API certificate issuance
* Allow kube-controller-manager to sign Approved CSR's using the
cluster CA private key to issue cluster certificates
* System components that need to use certificates signed by the
cluster CA can submit a CSR to the apiserver, have an admin
inspect and manually approve it, and be issued a certificate
* Admins should inspect CSRs very carefully to ensure their
origin and authorization level are appropriate
* https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/#approving-certificate-signing-requests
2019-01-06 17:17:03 -08:00
Dalton Hubble
4f8952a956 Disable anonymous auth on the bootstrap kube-apiserver
* Anonymous auth isn't used during bootstrapping and can
be disabled
2019-01-05 21:48:40 -08:00
Dalton Hubble
ea30087577 Structure control plane manifests neatly 2019-01-05 21:47:30 -08:00
Dalton Hubble
847ec5929b Consolidate both variants of the admin kubeconfig
* Provide an admin kubeconfig which includes a named context
and also sets that context as the current-context
* Retains support for both the KUBECONFIG=path style of usage
or adding many kubeconfig's to a ~/.kube/configs folder and
using `kubectl use-context CLUSTER-context`
2019-01-05 14:56:45 -08:00
Dalton Hubble
f5ea389e8c Update CoreDNS from v1.2.6 to v1.3.0
* https://coredns.io/2018/12/15/coredns-1.3.0-release/
* Limit log plugin to just log error class
2019-01-05 13:21:10 -08:00
Dalton Hubble
3431a12ac1 Remove deprecated kube_dns_service_ip output
* Use cluster_dns_service_ip output instead
2019-01-05 13:11:15 -08:00
Dalton Hubble
a7bd306679 Add admin kubeconfig and limit Kubelet cert to system:nodes group
* Change Kubelet TLS client certificate to belong to the system:nodes
group instead of the system:masters group (more limited)
* Bind the system:node ClusterRole to the system:nodes group (yes,
the ClusterRole is singular)
* Generate separate admin.crt and admin.key files (which do still use
system:masters). Output kubeconfig-kubelet and kubeconfig-admin values
from the module
* Remove the kubeconfig output to force users to pick the correct
kubeconfig, depending on how the output is used (action required!)

Related:

* https://kubernetes.io/docs/reference/access-authn-authz/rbac/#core-component-roles

Note, NodeAuthorizer/NodeRestriction would be an enhancement, but to
work across platforms it effectively requires TLS bootstraping which
doesn't have a viable attestation strategy and clashes with CCM. This
change improves Kubelet limitations, but intentionally doesn't aim to
steer toward NodeAuthorizer/NodeRestriction
2019-01-02 23:08:09 -08:00
Dalton Hubble
f382415f2b Edit CA certificate CommonName to match upstream
* Consistency with https://kubernetes.io/docs/setup/certificates/#single-root-ca
2019-01-01 17:30:33 -08:00
Dalton Hubble
7bcca25043 Use a kube-apiserver ServiceAccount and ClusterRoleBinding
* Switch kube-apiserver from using the kube-system default ServicAccount
(with cluster-admin) to using a kube-apiserver ServiceAccount bound to
cluster-admin (as before)
* Remove the default-sa ClusterRoleBinding that allowed kube-apiserver
and kube-scheduler (or other 3rd-party components added to kube-system)
to use the kube-system default ServiceAccount for cluster-admin
* Require all future components in kube-system define their own
ServiceAccount
2019-01-01 17:30:28 -08:00
Dalton Hubble
fa4c2d8a68 Use a kube-scheduler ServiceAccount and ClusterRoleBinding
* Switch kube-scheduler from using the kube-system default ServiceAccount
(with cluster-admin) to using a kube-scheduler ServiceAccount bound to
the builtin system:kube-scheduler and system:volume-scheduler
(required for StorageClass) ClusterRoles
* https://kubernetes.io/docs/reference/access-authn-authz/rbac/#core-component-roles
2019-01-01 17:29:36 -08:00
Dalton Hubble
d14348a368 Update Calico from v3.3.2 to v3.4.0
* Use an init container to install CNI plugins
* Update the calico-node ClusterRole
2018-12-15 18:04:25 -08:00
Dalton Hubble
51e3323a6d Update hyperkube from v1.13.0 to v1.13.1
* https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.13.md#v1131
2018-12-15 11:42:32 -08:00