Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Ubuntu Kubernetes VM Setup

This workspace contains a simple setup for turning an Ubuntu VM in Azure into a single-node Kubernetes cluster for lab and on-prem-like experimentation.

What this does

The script installs:

  • containerd as the container runtime
  • kubeadm, kubelet, and kubectl
  • a basic single-node Kubernetes control plane
  • Flannel networking

Prerequisites

  • An Ubuntu VM in Azure, preferably Ubuntu 22.04 or 24.04
  • At least 2 vCPUs and 4 GB RAM
  • SSH access to the VM
  • Network security group rules that allow the Kubernetes API and node ports if you want external access

Azure networking notes

For a lab setup, allow these ports from your source IP or subnet:

  • 6443/tcp for the Kubernetes API
  • 2379-2380/tcp for etcd
  • 10250/tcp for kubelet
  • 30000-32767/tcp for NodePort services

Usage

  1. Copy the script to your VM:

    scp scripts/install-k8s-single-node.sh user@YOUR_VM_IP:/tmp/
  2. SSH into the VM:

    ssh user@YOUR_VM_IP
  3. Run the script:

    chmod +x /tmp/install-k8s-single-node.sh
    sudo /tmp/install-k8s-single-node.sh
  4. Verify the cluster:

    kubectl get nodes
    kubectl get pods -A

Post-install

To use Kubernetes from your local machine, copy the kubeconfig:

mkdir -p ~/.kube
scp user@YOUR_VM_IP:/etc/kubernetes/admin.conf ~/.kube/config

Notes

This is intended for a learning or lab environment. For production, use a multi-node control plane and a supported production-grade CNI such as Calico.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages