Skip to main content
In this guide, you’ll deploy a stateless Nginx web server to your Linode Kubernetes Engine (LKE) cluster. We’ll use the official nginx:latest Docker image, scale it to two replicas, and expose it externally via a LoadBalancer service.

Prerequisites

  • An active LKE cluster with at least one node
  • kubectl configured to target your LKE cluster
  • Basic familiarity with Kubernetes concepts

1. Define Your Deployment and Service

Create a manifest file named nginx.yaml:
The LoadBalancer service type on LKE provisions a cloud load balancer and assigns it an external IP automatically.

2. Verify Your Context and Apply the Manifest

  1. Confirm you’re connected to the correct cluster:
  2. List your nodes to ensure they’re Ready:
  3. Deploy the Nginx resources:

3. Monitor Your Deployment

Use these commands to check the status of your pods, deployments, and service: Example output:

4. Retrieve the External IP

You should see output similar to:
It can take a minute or two for the EXTERNAL-IP to provision. If <pending> appears, wait a bit and run the command again.

5. Access Nginx in Your Browser

Open your web browser and navigate to:
You should see the default Nginx welcome page, confirming your application is live behind a cloud load balancer.

6. Inspect via the Kubernetes Dashboard

You can also verify the deployment and service in the Kubernetes Dashboard.
The image shows a Kubernetes dashboard displaying workloads, including deployments and pods, with details about an Nginx deployment. The interface lists various Kubernetes resources like Cron Jobs, Daemon Sets, and Replica Sets.
Here you’ll find the nginx-deployment with two Pods and a ReplicaSet.
The image shows a Kubernetes dashboard displaying details of a service named "nginxservice," including its type as a LoadBalancer, cluster IP, and endpoints. The interface also lists various Kubernetes resources like Workloads, Services, and Config Maps.
Inspect the nginxservice object to confirm it’s of type LoadBalancer with the correct cluster IP and external endpoints.
The image shows a Kubernetes dashboard displaying services, including "nginxservice" and "kubernetes," with details like type and IP addresses. The sidebar lists various Kubernetes resources such as Workloads and Config Maps.

Watch Video