A basic web page that displays a confirmation message
388
A basic web page, built using Next.js and delivered by Nginx, for deployment into Kubernetes. It is intended to be used as part of a lab exercise or an intructor-led walkthrough.
When running it presents a basic web page displaying a confirmation message:
To run the image using Docker you can use the following command:
docker run --rm -p 80:80 trainingdemos/k8s-frontend-basic
This will start an Nginx web server running on port 80 to serve the application. You can verify that the website is working by visiting http://localhost in a web browser.
The containerPort in the Pod spec should be set to port 80 and then access to the Pod should be opened up using a Service object along with a NodePort or Ingress.
Here is an example Pod object configuration:
apiVersion: v1
kind: Pod
metadata:
name: k8s-frontend-basic
labels:
frontend: basic
spec:
containers:
- name: k8s-basic-frontend
image: trainingdemos/k8s-frontend-basic:latest
ports:
- containerPort: 80
Content type
Image
Digest
sha256:b98e9caaa…
Size
17.9 MB
Last updated
almost 2 years ago
docker pull trainingdemos/k8s-frontend-basic