Add Pre-flight check for Minimum Memory and NumCPU configuration supported
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 328
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 9
Description
When we create a cluster with a small CPU configuration (< 2 CPU cores and < 2 GB CPU memory) cluster create gets stuck at Control Plane rollout. This was experienced while creating cluster for CloudStack provider and the root cause was found in the Cloud-init logs of the Control Plane Node which has the below error:
```[2023-04-04 00:05:48] Cloud-init v. 22.1-5.el8 running 'modules:config' at Tue, 04 Apr 2023 00:05:48 +0000. Up 33.58 seconds.
[2023-04-04 00:05:49] W0404 00:05:49.104439 9057 strict.go:55] error unmarshaling configuration schema.GroupVersionKind{Group:"kubeadm.k8s.io", Version:"v1beta3", Kind:"ClusterConfiguration"}: error unmarshaling JSON: while decoding JSON: json: unknown field "bottlerocketBootstrap"
[2023-04-04 00:05:49] [init] Using Kubernetes version: v1.23.16-eks-1-23-16
[2023-04-04 00:05:49] [preflight] Running pre-flight checks
[2023-04-04 00:05:49] [WARNING FileExisting-tc]: tc not found in system path
[2023-04-04 00:05:49] error execution phase preflight: [preflight] Some fatal errors occurred:
[2023-04-04 00:05:49] [ERROR NumCPU]: the number of available CPUs 1 is less than the required 2
[2023-04-04 00:05:49] [ERROR Mem]: the system RAM (460 MB) is less than the minimum 1700 MB
[2023-04-04 00:05:49] [preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
[2023-04-04 00:05:49] To see the stack trace of this error execute with --v=5 or higher
```
**What would you like to be added**:
Add a pre-flight validation for the provided CPU configuration for Control Plane node before proceeding with create cluster. Additionally, we can also call out in the docs for the minimum supported CPU configuration for Control Plane Mahine.
**Why is this needed**:
As the Create operation times out without any warning or error message, waiting for the Control Plane machine to be rolled out we need this check in place.
Contributor guide
Research direction
Start by tracing the cluster create path and where the Control Plane CPU and memory configuration is validated, then review the documentation for Control Plane requirements. Done means undersized configurations are rejected before rollout with a useful error, and the minimum supported CPU and memory are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- cloud, devops, infrastructure
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100