A minimal Kubernetes cluster setup using Minikube to demonstrate essential tools for modern cloud native app development and deployment
- Minikube: Local Kubernetes cluster
- Helm: Kubernetes package manager
- Envoy Gateway: Kubernetes native API Gateway
- Knative Serving: Serverless platform with scale-to-zero support
- Headlamp: User-friendly Kubernetes dashboard
app-deployment/— Sample application deployed as both a Kubernetes service and a Knative serviceenvoy-gw/— Install and configure Envoy Gateway using Helmheadlamp/— Headlamp installation with Helm and routing setupknative/— Install Knative Serving with Kourier ingress using knative-operator helm chartminikube/— Minikube start/delete scriptssetup.sh— Spin up the complete clusterclean-up.sh— Tear down everything
- Envoy Gateway as API gateway
- Knative for serverless app deployment
- Headlamp for Kubernetes dashboard
- Sample app deployed in
appnamespace - All HTTP routing via Envoy
# Port-forward Envoy Gateway
kubectl -n envoy-gw port-forward svc/envoy-api-gw 8000:80
# Access sample apps
curl localhost:8000/web-app-svc
curl localhost:8000/web-app-knative-svc
# Get Headlamp token
sh headlamp/get-token.sh
# Access Headlamp via:
curl localhost:8000/headlampsh setup.shsh clean-up.sh- app-deployment.yaml:
- Kubernetes Deployment for the sample application
- Kubernetes objects defined in this file are:
- Deployment:
web-app-deploy - Service:
web-app-svc - Http Route:
web-app-http-route
- Deployment:
- Both deployments are used dilankarathnasiri/simple-web-server docker image from Simple Utils GitHub repo
- app-ksvc.yaml:
- Knative serverless deployment for the sample application
- Kubernetes objects defined in this file are:
- Knative service:
web-app-knative-svc - Http Route:
web-app-knative-http-route
- Knative service:
- app-ns.yaml:
- Defines
appnamespace - All the application related resources except Http Routes are defined in
appnamespace - Http Routes are defined in
envoy-gwnamespace
- Defines
- app-reference-grant.yaml:
envoy-app-reference-grantreference grant to allow traffic from envoy gateway to services in the app namespace
- deploy-app.sh:
- Bash script to deploy sample applications
- remove-app.sh:
- Bash script to remove deployed applications
- config-envoy-gw.yaml:
- Configuration for Envoy Gateway and related resources
- Kubernetes objects defined in this file are:
- Gateway Class:
envoy-gw - Envoy Proxy:
envoy-gw-proxy-config - Gateway:
envoy-gw - HTTP Route Filter:
health-inline-response - HTTP Route:
health-routefor health checks - HTTP Route Filter:
default-inline-response - HTTP Route:
default-routefor when no matching route is found
- Gateway Class:
- envoy-gw-ns.yaml:
- Defines
envoy-gwnamespace - All the envoy gateway related resources and Http Routes are defined in
envoy-gwnamespace
- Defines
- install-envoy-gw.sh:
- Bash script to install and configure Envoy Gateway
- remove-envoy-gw.sh:
- Bash script to uninstall Envoy Gateway and clean up resources
- headlamp-http-route.yaml:
- Define
headlamp-http-route
- Define
- headlamp-ns.yaml:
- Defines
headlampnamespace - All the headlamp related resources are defined in
headlampnamespace
- Defines
- headlamp-reference-grant.yaml:
envoy-headlamp-reference-grantreference grant to allow traffic from envoy gateway to headlamp
- install-headlamp.sh:
- Bash script to install and configure Headlamp dashboard
- remove-headlamp.sh:
- Bash script to uninstall Headlamp and clean up resources
- get-token.sh:
- Helper script to obtain authentication token for Headlamp dashboard
- Creates and displays a service account token
- values.yaml:
- Helm values configuration for Headlamp
- Configures the base URL to
/headlamp
- knative-configs.yaml:
- Configuration for Knative Serving with Kourier as the ingress
- Disables Istio and enables Kourier with ClusterIP service type as the default ingress for Knative Serving
- Configures the default domain settings
- knative-ns.yaml:
- Defines Kubernetes namespaces for Knative components:
knative-operator: For the Knative Operatorknative-serving: For Knative Serving components
- Defines Kubernetes namespaces for Knative components:
- kourier-reference-grant.yaml:
envoy-kourier-reference-grantreference grant to allow traffic from envoy gateway to kourier
- install-knative.sh:
- Bash script to install and configure Knative Serving with Kourier
- Sets up the Knative Operator and applies the serving configuration
- Waits for Kourier gateway to be ready
- remove-knative.sh:
- Bash script to uninstall Knative and clean up resources
- kourier-wait/:
- Contains a Python script that waits for Kourier gateway to be ready
- Used internally by the
install-knative.sh
- start-minikube.sh:
- Bash script to start a local Minikube cluster
- delete-minikube.sh:
- Bash script to delete the local Minikube cluster