For a Kubernetes lab in Oracle Free Tier with 24 GB of memory and 4 VMs, you can optimize the setup as follows:
Option 1: 4-Node Cluster
- VM1 (Master Node) : 3 GB RAM, 1 vCPU
- VM2-VM4 (Worker Nodes) : 7 GB RAM each, 1 vCPU per VM
This setup distributes resources evenly and provides 3 worker nodes for running workloads. The master node doesn’t need as much RAM since it primarily handles control plane tasks.
Option 2: 3-Node Cluster (More Balanced)
- VM1 (Master Node) : 4 GB RAM, 2 vCPU
- VM2-VM3 (Worker Nodes) : 10 GB RAM each, 1 vCPU per VM
This setup reduces the number of worker nodes but allocates more memory per worker node, which is great if you plan to run resource-heavy workloads.
Option 3: Single-Node Kubernetes Cluster
- VM1 (All-in-One Node) : 24 GB RAM, 4 vCPU
If you want simplicity for learning and testing, this option provides a single-node Kubernetes cluster where the master and worker workloads coexist.
Recommendation:
- For High Availability Testing : Choose Option 1 (4 nodes) to simulate a multi-node Kubernetes cluster.
- For Simplicity with Power : Go for Option 3 (all-in-one VM) if you need a powerful single-node setup.