feat(cloudflared): publish the kube-apiserver at k8s.riotpiao.com #88
Open
rock
wants to merge 1 commits from
feat/k8s-api-public-tunnel into main
pull from: feat/k8s-api-public-tunnel
merge into: :main
:main
:fix/forgejo-gitea-cpu-limits
:fix/llm-serving-poimen-netpol
:chore/park-clef-for-candle
:feat/k8s-api-public-tunnel
:feat/key-rotation-crd
:feat/comfyui-sso
:chore/authentik-retirement
:fix/grafana-oidc-secret
:feat/grafana-gotify-contact
:feat/grafana-gotify-bridge
:feat/igotify-token
:revert/gotify-sso
:feat/gotify-sso
:fix/authentik-tunnel-route
:feat/zitadel-oidc-consumer-wiring
:integration/merge-56-58-69
:harness/zitadel-iam-wiring
:fix/prometheus-retention-size
:fix/allow-zitadel-chart-repo
:fix/sops-generator-indent
:fix/sops-drop-orphan-forgejo-pat
:chore/remove-azhi-riotpiao-app
:fix/certmanager-dns01
:fix/retire-longhorn-disk4
:feat/azhi-cnpg-test
:feat/azhi-riotpiao-argocd
:fix/etcd-defrag-main
:feat/local-path-backend
:fix/minio-frozen-image-pin
:fix/minio-mc-image
:fix/secrets-placeholders
:fix/minio-image
:harness/51-vllm-prefill-scheduling
:paperless-ai-sops-fix
:fix/aggressive-cleanup-and-paperless-ai
:feat/tekton-pipelines-ci
:fix/longhorn-storage-isolation
:fix/cnpg-3-replicas
:fix/org-transfer-urls
:fix/argocd-repo-url
:feat/gotify-notifications
:feat/p3.9-e2e-auth-test
No Reviewers
Labels
Clear labels
area/auth
area/authentik
area/downstream
area/event-bus
area/gateway
area/notifications
area/observer
priority/high
priority/medium
status/blocked
status/done
status/in-progress
status/review
status/todo
type/docs
type/feature
type/infra
Authentication & authorization
Authentik OIDC provider config
Downstream service changes
Event routing and notification pipeline
API gateway code (homelab-frontend)
Gotify, SMTP, push notifications
Poimen goal-driven observation and pattern detection
Must have
Should have
Blocked by dependency
Completed
Currently being worked on
Ready for review
Not started
Documentation
New feature
Infrastructure change
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: riotpiao-poimen/homelab#88
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why
The apiserver now authenticates against ZITADEL (PR #87, applied and verified), so
kubectlcan work from outside the LAN without a client certificate. This publishes it through the existing Cloudflare Tunnel.Two deliberate details
Origin is the in-cluster Service (
kubernetes.default.svc.cluster.local:443), not a node IP. That survives a control-plane address change and lets each connector reach a local-healthy apiserver.originRequest.noTLSVerify: trueis required. The apiserver presents a certificate for the cluster CA plus its node addresses, so its SANs cannot match this public hostname. Cloudflare terminates the public TLS with the*.riotpiao.comedge certificate and the connector hop is already inside the cluster. Scoped to this one rule.Port
Cloudflare Tunnel hostname rules serve on 443 and do not proxy arbitrary ports. kubeconfig must use
https://k8s.riotpiao.comwith no:6443.Already done out-of-band
k8s.riotpiao.com→32d0bf93-….cfargotunnel.com, proxied (created via the Cloudflare API, verified resolving).Security — please read
This exposes the Kubernetes API to the internet. Authentication remains ZITADEL OIDC plus client certificates, so an unauthenticated caller gets 401. The residual risk is scanner noise and DoS, not auth bypass.
Recommended follow-up: a Cloudflare Access application in front of
k8s.riotpiao.com. Trade-off worth knowing before you choose:kubectlcannot send arbitrary headers, so it needs either a localcloudflared accessproxy or a kubeconfigproxy-url.So there is a real convenience/security trade. My read: enable Access if this hostname will be internet-facing long-term; otherwise keep the OIDC requirement alone and accept the scanner traffic.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.