Coder Social home page Coder Social logo

itmustbejj / cloudflare-operator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adyanth/cloudflare-operator

0.0 0.0 0.0 739 KB

A Kubernetes Operator to create and manage Cloudflare Tunnels and DNS records for (HTTP/TCP/UDP*) Service Resources

Home Page: https://adyanth.site/posts/migration-compose-k8s/cloudflare-tunnel-operator-architecture/

License: Apache License 2.0

Go 90.59% Makefile 7.93% Dockerfile 1.48%

cloudflare-operator's Introduction

Cloudflare Operator

Logo

A Kubernetes Operator to create and manage Cloudflare Tunnels and DNS records
for (HTTP/TCP/UDP*) Service Resources

Getting Started Guide »

Report Bug · Request Feature

GitHub license GitHub forks GitHub stars GitHub issues Go Report Card

NOTE: This project is currently in Alpha

UDP*: UDP support for Cloudflare Tunnels is in Early Access

Motivation

The Cloudflare Tunnels guide for deployment on Kubernetes provides a manifest which is very bare bones and does not hook into Kubernetes in any meaningful way. The operator started out as a hobby project of mine to deploy applications in my home lab and expose them to the internet via Cloudflare Tunnels without doing a lot of manual work every time a new application is deployed.

Overview

The Cloudflare Operator aims to provide a new way of dynamically deploying the cloudflared daemon on Kubernetes. Scaffolded and built using operator-sdk. Once deployed, this operator provides the following:

  • Ability to create new and use existing Tunnels for Cloudflare for Teams using Custom Resources (CR/CRD) which will:
    • Accept a Secret for Cloudflare API Tokens and Keys
    • Run a scaled (configurable) Deployment of cloudflared
    • Manage a ConfigMap for the above Deployment
    • Have Cluster and Namespace scoped Tunnels
  • A TunnelBinding controller which does the following:
    • Update the cloudflared ConfigMap to include the new Services to be served under a given Tunnel
    • Restart the cloudflared Deployment to make the configuration change take effect
    • Add a DNS entry in Cloudflare for the specified domain to be a proxied CNAME to the referenced tunnel
    • Reverse the above when the TunnelBinding is deleted using Finalizers

Bird's eye view

Here is how the operator and the Tunnel Resource fit into your deployment.

Operator Architecture

There is more detailed information on this architecture and the thought process behind it in my blog post.

Getting Started

Go through the dedicated documentation on Getting Started to learn how to deploy this operator and a sample tunnel along with a service to expose.

Look into the Configuration documentation to understand various configurable parameters of this operator.

NOTE: This is NOT an official operator provided/backed by Cloudflare Inc. It utilizes their v4 API and their cloudflared to automate setting up of tunnels on Kubernetes.

cloudflare-operator's People

Contributors

adyanth avatar ygelfand avatar acrogenesis avatar kallan357 avatar matthewhembree avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.