This project demonstrates how to deploy the Online Boutique demo application, a cloud-native microservices application, into a Kubernetes cluster hosted on Linode.
Before you begin, it’s important to understand the following:
- Which microservices are included in the deployment
- How the services are connected
- What dependencies each service has (e.g., databases, third-party services)
- Which microservice is publicly accessible (i.e., the entry point to the cluster)
- A visual diagram of service interactions is recommended for better understanding
-
A Linode account with access to create a Kubernetes cluster
-
Minikube installed and running on your local machine for local testing
-
Refer to the Minikube official documentation for installation instructions
-
Minikube requires either a container runtime (e.g., Docker) or a virtual machine manager (e.g., VirtualBox). See the Minikube drivers documentation for details
-
To start Minikube with Docker as the preferred driver:
minikube start --driver=docker
-
-
kubectlinstalled for interacting with both local and cloud-based Kubernetes clustersNote:
kubectlis included with Minikube by default, so a separate installation may not be necessary
- A ready-to-use
config.yamlfile is already provided for deployment - If needed, you can use the included skeleton file
config_skeleton.yamlto create custom Deployments and Services for each microservice - Make sure to define correct resource, labels, ports, and dependencies
- Log in to your Linode account
- Create a new Kubernetes cluster:
- Choose a name
- Select your nearest region
- Add 3 small nodes (shared CPU)
- Once the cluster is ready and nodes are running, download the kubeconfig file (used to authenticate and connect to your cluster)
-
Set the proper permissions on the kubeconfig file:
chmod 400 <your-kubernetesconfig-file.yaml>
-
Export the kubeconfig file as an environment variable:
export KUBECONFIG=<your-kubernetesconfig-file.yaml>
-
Test the connection:
kubectl get nodes
- Create a namespace:
kubectl create namespace microservices
- Deploy the microservices into the namespace:
kubectl apply -f config.yaml -n microservices
- Check that all pods are running:
kubectl get pods -n microservices
- Check available services:
kubectl get svc -n microservices
- Go to your Linode Kubernetes dashboard
- Choose a public IP from one of the worker nodes
- Use the assigned NodePort (30007) to access the application:
http://<worker-node-ip>:30007