Easly Deploy Static Website to Kubernetes without the custom docker images

apiVersion: apps/v1
kind: Deployment
metadata:
name: static-website
spec:
selector:
matchLabels:
app: static-website
template:
metadata:
labels:
app: static-website
spec:
containers:
- name: static-website
image: nginx:alpine
ports:
- containerPort: 80
volumeMounts:
- mountPath: /usr/share/nginx/html
subPath: example-static-website
name: static-website-volume
volumes:
- name: static-website-volume
gitRepo:
repository: https://github.com/abdennour/example-static-website.git
volumes:- name: static-website-volume        gitRepo:repository: https://github.com/abdennour/example-static-website.git
revision: 0229f2c228fba8728183878cf58fb078c7612763

--

--

--

Software engineer, Cloud Architect, 5/5 AWS|GCP|PSM Certified, Owner of kubernetes.tn

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abdennour Toumi

Abdennour Toumi

Software engineer, Cloud Architect, 5/5 AWS|GCP|PSM Certified, Owner of kubernetes.tn

More from Medium

Deploying Jitsi Meet to k3d cluster using Helm Chart

JSON Web Token Authentication on Kubernetes using Nginx Ingress Controllers

Secure application using Nginx Auth in Kubernetes

How to Use Kustomize for Your Kubernetes Projects