This project demonstrates a lightweight Linux desktop running in a container, exposed via VNC in a web browser, and orchestrated with Kubernetes on Google Kubernetes Engine (GKE) using Terraform for infrastructure provisioning.
k8s-task/
├── terraform/
│ ├── main.tf
│ ├── variables.tf
│ └── provider.tf
├── k8s-manifests/
│ ├── deployment.yml
│ └── service.yml
├── Dockerfile
└── README.md
Install the following tools:
sudo apt update
sudo snap install docker
sudo snap install kubectl --classic
sudo snap install google-cloud-cli --classic
Authenticate Google Cloud:
gcloud auth login
gcloud auth application-default login
gcloud config set project <your-gcp-project-id>
Enable required APIs:
gcloud services enable container.googleapis.com
gcloud services enable compute.googleapis.com
Navigate to the Terraform directory:
cd terraform/
terraform init
terraform apply
This will:
- Create a GKE cluster
- Configure networking
After successful apply, run:
gcloud container clusters get-credentials cambioml-cluster --region=us-central1
- Authenticate Docker to GCR:
gcloud auth configure-docker
- Build and push your container:
docker build -t gcr.io/cambioml-vnc-microvm/vnc-microvm:latest .
docker push gcr.io/cambioml-vnc-microvm/vnc-microvm:latest
- Update your image in deployment.yml accordingly.
Apply your deployment and service:
kubectl apply -f ../k8s-manifests/deployment.yml
kubectl apply -f ../k8s-manifests/service.yml
Fetch the external IP:
kubectl get svc
Open in your browser:
This will load a Linux desktop environment via noVNC in your browser.
Based on dorowu/ubuntu-desktop-lxde-vnc, with LXDE and VNC access on port 6080.
Sets up the GKE cluster and networking.
-
deployment.yml: Deploys the containerized desktop.
-
service.yml: Exposes the pod using a LoadBalancer.
-
noVNC: Web-based VNC client for browser access.
-
Boot time: < 15 seconds (cold start)
-
Lightweight LXDE ensures minimal image size
-
Stateless setup; easy to scale horizontally
-
Enable autoscaling based on usage
-
Integrate ephemeral storage per pod
-
Secure VNC with authentication
-
Add metrics collection with Prometheus/Grafana
This was built for the CambioML Founding Cloud Infra Engineer Challenge. Let me know if you'd like to collaborate further or want to improve this system with GPU-enabled desktops or ephemeral runners.

