feat: add native Kubernetes service discovery and auto-ingress (#1607)#1608
Open
mahendrarathore1742 wants to merge 1 commit intocloudflare:masterfrom
Open
feat: add native Kubernetes service discovery and auto-ingress (#1607)#1608mahendrarathore1742 wants to merge 1 commit intocloudflare:masterfrom
mahendrarathore1742 wants to merge 1 commit intocloudflare:masterfrom
Conversation
…flare#1607) Implements native Kubernetes API integration for cloudflared, enabling automatic discovery and exposure of annotated Kubernetes services through Cloudflare Tunnel without manual ingress configuration. ## New k8s/ package - Lightweight REST client (no client-go dependency) supporting both in-cluster service account auth and kubeconfig-based auth - Annotation-based service discovery: - cloudflared.cloudflare.com/tunnel: "true" (required) - cloudflared.cloudflare.com/hostname (override generated hostname) - cloudflared.cloudflare.com/port (select specific service port) - cloudflared.cloudflare.com/scheme (http/https) - cloudflared.cloudflare.com/path (path regex for ingress rule) - cloudflared.cloudflare.com/no-tls-verify (disable TLS verify) - cloudflared.cloudflare.com/origin-server-name (SNI override) - Ingress rule generation from discovered services with merge/dedup - Periodic watcher with configurable resync interval for runtime updates ## CLI subcommands (cloudflared tunnel kubernetes) - discover: one-shot service discovery (table/json/yaml output) - watch: continuous watching with live updates - generate-config: output mergeable ingress YAML ## Config file support kubernetes: enabled: true baseDomain: example.com namespace: default exposeAPIServer: true apiServerHostname: k8s.example.com ## Integration - Startup: discovered services merged into ingress rules at tunnel start - Runtime: watcher updates orchestrator config on service changes - Optional Kubernetes API server exposure through the tunnel Closes cloudflare#1607
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements native Kubernetes API integration for cloudflared, enabling automatic discovery and exposure of annotated Kubernetes services through Cloudflare Tunnel without manual ingress configuration.
New k8s/ package
CLI subcommands (cloudflared tunnel kubernetes)
Config file support
kubernetes: enabled: true baseDomain: example.com namespace: default exposeAPIServer: true apiServerHostname: k8s.example.com
Integration
Closes #1607