Usage#
This section covers how to deploy static websites using kup6s-pages.
Basic Example#
Create a StaticSite resource to deploy a website from a Git repository:
apiVersion: pages.kup6s.com/v1beta1
kind: StaticSite
metadata:
name: my-website
namespace: pages
spec:
repo: https://github.com/user/my-website.git
domain: www.example.comThe operator will:
- Create a Traefik Middleware (
my-website-prefix) withaddPrefix: /my-website - Create a Traefik IngressRoute for
Host(www.example.com) - Create a cert-manager Certificate for the domain
- The Syncer clones the repo to
/sites/my-website/
Check Status#
# List all sites
kubectl get staticsites -A
# Detailed status
kubectl describe staticsite my-website -n pages
# Short form
kubectl get ss -n pagesAuto-Generated Domain#
If no domain is specified, the site gets a subdomain of the configured pages domain:
apiVersion: pages.kup6s.com/v1beta1
kind: StaticSite
metadata:
name: my-project
namespace: pages
spec:
repo: https://github.com/user/my-project.git
# No domain specified → https://my-project.pages.kup6s.comBuild Output Subpath#
For sites with build tools (Vite, Hugo, Sphinx, etc.) where the output is in a subdirectory:
apiVersion: pages.kup6s.com/v1beta1
kind: StaticSite
metadata:
name: docs
namespace: pages
spec:
repo: https://github.com/user/docs.git
branch: main
path: /dist # Serve only the /dist directory
domain: docs.example.comThe Syncer clones to /sites/.repos/docs/ and creates a symlink /sites/docs/ → /sites/.repos/docs/dist/.