Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

variants: Add metal-k8s-1.21 variant #1904

Merged
merged 3 commits into from
Jan 20, 2022

Conversation

zmrow
Copy link
Contributor

@zmrow zmrow commented Jan 14, 2022

Description of changes:
Following along the series of changes in the metal-dev PR (#1895), this PR adds a variant meant for running Bottlerocket as a worker node in Kubernetes clusters on bare metal. It is similar in scope to the other Kubernetes variants, and includes sane defaults for running off AWS.

This change adds an additional variant `metal-k8s-1.21`, which includes
necessary Kubernetes packages and settings for running Bottlerocket on
metal in a Kubernetes cluster.
VMware and metal variants both use host containers pulled from public
ECR.  This change creates a single file that both variants can use.
VMware and metal variants use the same logdog config, so this change
renames the config to `k8s.conf` and fixes up the symlinks accordingly.

Testing done:
Similar to #1895 , all testing was performed on 2 Supermicro SYS-E200-8D machines. Testing was performed using the following configurations:

  • BIOS: Boot from SATA (BIOS / NVME isn't supported by my hardware)
  • UEFI: Boot from NVME
  • UEFI: Boot from SATA

Tests:

  • Ran kubelet in standalone mode and confirmed it was able to run a redis pod via static pods. (I don't currently have a Kubernetes cluster at home to join)

  • All host containers worked swimmingly given the correct user data

    • Admin container / sheltie works as normal
    • Used SSM to start a session on the control container and all is well
  • Bootstrap containers are happy

  • Inspected journal logs, nothing alarming there (though kubelet would really like a CNI plugin :) )

  • Successfully built and ran the vmware-k8s-1.21 variant to ensure I didn't break anything there. :)

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.
T license.

Comment on lines +15 to +17
[package.metadata.build-variant]
image-format = "raw"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also expand the OS image size to 4 GiB (two banks of 2 GiB) - since I expect to need some extra space for firmware, etc.

@@ -0,0 +1 @@
exec kube-status systemctl status kube* -l --no-pager
Copy link
Contributor

@webern webern Jan 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this different from the other k8s variants? (edit: the underlying question is I was wondering if there's a shared file or if we should make one)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The aws file differs, but we could probably unify the vmware and metal files since they're the same, and both are "off-AWS" variants.

zmrow added 3 commits January 19, 2022 20:54
This change adds an additional variant `metal-k8s-1.21`, which includes
necessary Kubernetes packages and settings for running Bottlerocket on
metal in a Kubernetes cluster.
VMware and metal variants both use host containers pulled from public
ECR.  This change creates a single file that both variants can use.
VMware and metal variants use the same logdog config, so this change
renames the config to `k8s.conf` and fixes up the symlinks accordingly.
@zmrow zmrow force-pushed the metal-k8s-variant branch from 8e1de16 to f1ea496 Compare January 19, 2022 22:33
@zmrow
Copy link
Contributor Author

zmrow commented Jan 19, 2022

^ Added 2 additional commits: the first unifies the public host containers into one file in models, the second unifies the "off-AWS" config into a single file in logdog.

@zmrow zmrow merged commit d9b3118 into bottlerocket-os:develop Jan 20, 2022
@zmrow zmrow deleted the metal-k8s-variant branch January 20, 2022 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants