Examples

Sample applications and use cases

The manifests live in examples/ in the repository. Run the commands from the repository root with the lab kubeconfig.

Hostnames are published automatically: ExternalDNS adds <name>.lab.internal to the lab DNS within ~30s of a Gateway being created, so there is nothing to add to /etc/hosts.

ExampleWhat it shows
podinfo-app.yamlA small app behind the Istio ingress gateway
hello-app.yamlA minimal app behind a catch-all (*) Gateway in an Istio-injected namespace: mesh tracing for free
nfs-pv-pvc.yamlDynamic and static NFS storage
vault-secret-app.yamlA pod that logs in to Vault with its ServiceAccount and reads a secret
otel-demo-app/A Go app with full trace → log correlation
otel-operator-instrumentation.yamlCode-level auto-instrumentation with the OTel Operator

Podinfo

kubectl apply -f examples/podinfo-app.yaml
curl http://podinfo.lab.internal

NFS storage

kubectl apply -f examples/nfs-pv-pvc.yaml

kubectl get pv
kubectl get pvc -A
kubectl get pods -n dynamic-demo    # PV created by the provisioner
kubectl get pods -n static-demo     # pre-created PV

Vault secrets in a pod

kubectl apply -f examples/vault-secret-app.yaml

kubectl logs -l app=vault-demo -c vault-fetch-secrets   # ServiceAccount login and fetch
kubectl logs -l app=vault-demo -c app                   # the app using the secret
kubectl exec -it deploy/vault-demo-app -- cat /vault/secrets/grafana-admin.json   # in-memory file

kubectl delete -f examples/vault-secret-app.yaml

See Vault for policies and roles.


Httpbin (complete Istio example)

kubectl create namespace demo
kubectl label namespace demo istio-injection=enabled
kubectl apply -n demo -f https://raw.githubusercontent.com/istio/istio/release-1.31/samples/httpbin/httpbin.yaml
kubectl apply -f - <<EOF
apiVersion: networking.istio.io/v1
kind: Gateway
metadata:
  name: httpbin-gateway
  namespace: demo
spec:
  selector:
    istio: ingressgateway
  servers:
  - port:
      number: 80
      name: http
      protocol: HTTP
    hosts:
    - "httpbin.lab.internal"
---
apiVersion: networking.istio.io/v1
kind: VirtualService
metadata:
  name: httpbin
  namespace: demo
spec:
  hosts:
  - "httpbin.lab.internal"
  - "httpbin.demo.svc.cluster.local"
  gateways:
  - httpbin-gateway
  - mesh
  http:
  - route:
    - destination:
        host: httpbin
        port:
          number: 8000
EOF
curl http://httpbin.lab.internal/headers
curl http://httpbin.lab.internal/ip
curl -X POST http://httpbin.lab.internal/post -d "test=data"

For HTTPS, give the Gateway its own certificate from the lab CA, as shown in Lab DNS → Publishing your own app.


Tracing demo

kubectl apply -f examples/otel-demo-app/deploy.yaml

The manifest includes a curl client that keeps sending requests. Open Grafana → Explore → Tempo, pick a trace and use Logs for this span to jump to its log lines in Loki. See Observability → Tracing.


Lab URLs

URLService
https://grafana.lab.internalGrafana (k8s-lab dashboard)
https://prometheus.lab.internalPrometheus
https://alertmanager.lab.internalAlertmanager
https://kiali.lab.internal/kialiKiali
https://keycloak.lab.internalKeycloak
https://vault.lab.internal:8200Vault UI
https://karpor.lab.internalKarpor (when enabled)
http://podinfo.lab.internalPodinfo example
http://httpbin.lab.internalHttpbin example