Commit Graph

7 Commits (5a79680b22f9efb2e447cb643367dc79fb1c00d9)

Author SHA1 Message Date
Dustin 5a79680b22 tf/userdata: Install CRI-O from Fedora base
The *cri-o* package has moved from its own module into the base Fedora
repository, as Fedora is [eliminating modules][0].  The last modular
version was 1.25, which is too old to run pods with user namespaces.
Version 1.26 is available in the base repository, which does support
user namespaces.

[0]: https://fedoraproject.org/wiki/Changes/RetireModularity
2024-01-13 10:10:46 -06:00
Dustin 473e279a18 tf/userdata: Remove default DNS configuration
Lately, cloud nodes seem to be failing to come up more frequently.  I
traced this down to the fact that `/etc/resolv.conf` in the `kube-proxy`
container contains both the AWS-provided DNS server and the on-premises
server set by Wireguard.  This evidently "works" correctly sometimes,
but not always.  When it doesn't, the `kube-proxy` cannot resolve the
Kubernetes API server address, and thus cannot create the necessary
netfilter rules to forward traffic correctly.  This causes pods to be
unable to communicate.

I am not entirely sure what the "correct" solution to this problem would
be, since there are various issues in play here.  Fortunately, cloud
nodes are only ever around for a short time, and never need to be
rebooted.  As such, we can use a "quick fix" and simply remove the
AWS-provided DNS configuration.
2023-11-13 19:52:57 -06:00
Dustin 83b8c4a7cc userdata: Set kubelet config path
The default configuration for the *kubelet.service* unit does not
specify the path to the `config.yml` generated by `kubeadm`.  Thus, any
settings defined in the `kublet-config` ConfigMap do not take effect.
To resolve this, we have to explicitly set the path in the `config`
property of the `kubeletExtraArgs` object in the join configuration.
2023-11-13 19:49:32 -06:00
Dustin c4cabfcdbc terraform: Update node template to Fedora 37
dustin/dynk8s-provisioner/pipeline/head This commit looks good Details
2023-06-11 20:22:44 -05:00
Dustin 2f0f134223 terraform: userdata: Add Longhorn issue workaround
dustin/dynk8s-provisioner/pipeline/head This commit looks good Details
There's apparently a bug in open-iscsi (see
[issue #4988](https://github.com/longhorn/longhorn/issues/4988)) that
prevents Longhorn from working on Fedora 36+.  We need a SELinux policy
patch to work around it.
2023-01-10 21:09:46 -06:00
Dustin b01841ab72 terraform: Update node template to Fedora 36
dustin/dynk8s-provisioner/pipeline/head Something is wrong with the build of this commit Details
2023-01-10 17:19:20 -06:00
Dustin e11f98b430 terraform: Add config for auto-scaling group
The Cluser Autoscaler uses EC2 Auto-Scaling Groups to configure the
instances it launches when it determines additional worker nodes are
necessary.  Auto-Scaling Groups have an associated Launch Template,
which describes the properties of the instances, such as AMI ID,
instance type, security groups, etc.

When instances are first launched, they need to be configured to join
the on-premises Kubernetes cluster.  This is handled by *cloud-init*
using the configuration in the instance user data.  The configuration
supplied here specifies the Fedora packages that need to be installed on
a Kubernetes worker node, plus some additional configuration required by
`kubeadm`, `kubelet`, and/or `cri-o`.  It also includes a script that
fetches the WireGuard client configuration and connects to the VPN,
finalizes the setup process, and joins the cluster.
2022-10-11 21:40:42 -05:00