Gefyra runs local code in any Kubernetes cluster without the build and push cycle. It overlays containers in the cluster making code changes immediately available.
Blazingly-fast, rock-solid, local application development with Kubernetes!
Explore the docs »
Try it yourself
·
Report Bug
·
Request Feature
Short manual on where and how to start. You can find detailed information here (installation) and here (usage).
Installation CLIWe offer platform specific installations:
Linux/MacOS via script/cURLcurl -sSL https://raw.githubusercontent.com/gefyrahq/gefyra/main/install.sh | sh -MacOS via Homebrew
brew tap gefyrahq/gefyra brew install gefyraWindows (Manual)
Download the latest binary for Windows under here.
Docker Desktop ExtensionWorking with Docker Desktop? We offer an extension to operate Gefyra through a UI on Docker Desktop.
Your First BridgeMake sure Gefyra is installed on your cluster (gefyra up
). Some details of the installation depend on your Kubernetes' platform.
Check out our docs for more details.
Bridge a local container into an existing cluster. For a detailed guide please check out this article.
gefyra run -i <image_name> -N <container_name> -n default
gefyra bridge -N <container_name> -n <k8s_namespace> --target deployment/<k8s_deployment>/<k8s_deployment_container>
Explanation for placeholders:
container_name
the name of the container you created in the previous stepk8s_namespace
the namespace your target workload runs ink8s_deployment
the name of your target deploymentk8s_deployment_container
the name of the container within k8s_deployment
bridge_name
the name for the bridge being createdAll available bridge
flags are listed here.
Gefyra gives Kubernetes-("cloud-native")-developers a completely new way of writing and testing their applications.
Gone are the times of custom docker-compose
setups, Vagrants, custom scripts or other scenarios in order to develop (micro-)services
for Kubernetes.
Gefyra offers you to:
(back to top)
Built withGefyra builds on top of the following popular open-source technologies:
DockerDocker is currently used in order to manage the local container-based development setup, including the host, networking and container management procedures.
WireguardWireguard is used to establish the connection tunnel between the two ends. It securely encrypts the UDP-based traffic and allows to create a site-to-site network for Gefyra. That way, the development setup becomes part of the cluster and containers running locally are actually able to reach cluster-based resources, such as databases, other (micro)services and so on.
CoreDNSCoreDNS provides local DNS functionality. It allows resolving resources running within the Kubernetes cluster.
NginxNginx is used for all kinds of proxying and reverse-proxying traffic, including the interceptions of already running containers in the cluster.
RsyncRsync is used to synchronize directories from containers running in the cluster to local instances. This is particularly important for Kubernetes service account tokens during a bridge operation.
(back to top)
Getting StartedYou can easily try Gefyra yourself following this small example.
PrerequisitesFollow the installation for your preferred platform.
Create a local Kubernetes cluster with k3d
like so:
< v5 k3d cluster create mycluster --agents 1 -p 8080:80@agent[0] -p 31820:31820/UDP@agent[0]
>= v5 k3d cluster create mycluster --agents 1 -p 8080:80@agent:0 -p 31820:31820/UDP@agent:0
This creates a Kubernetes cluster that binds port 8080 and 31820 to localhost. kubectl
context is immediately set to this cluster.
Apply some workload, for example from the testing directory of this repo:
kubectl apply -f testing/workloads/hello.yaml
Check out this workload running under: http://hello.127.0.0.1.nip.io:8080/
gefyra up
cd testing/images/ && docker build -f Dockerfile.local . -t pyserver
gefyra run -i pyserver -N mypyserver -n default
docker exec -it mypyserver bash
wget -O- hello-nginx
will print out the website of the cluster service hello-nginx from within the cluster.gefyra bridge -N mypyserver -n default --target deployment/hello-nginxdemo/hello-nginx --port 80:8000
gefyra list --bridges
gefyra unbridge -N mypybridge
Check out the initial response from: http://hello.127.0.0.1.nip.io:8080/
gefyra down
k3d cluster delete mycluster
(back to top)
UsageThe following actions are available in Gefyra's CLI:
up
: setup local development infrastructurerun
: deploy a new app container into the clusterbridge
: intercept the traffic to a container that's running in the cluster and send it to the development containerunbridge
: remove active traffic intercepts and reset the cluster to its original statedown
: remove Gefyra's development infrastructurelist
: list running containers and active bridgescheck
: check local system dependenciesversion
: print the current version and exitFor more examples, please refer to the CLI documentation
(back to top)
Why "Gefyra""Gefyra" is the Greek word for "Bridge" and fits nicely with Kubernetes' nautical theme.
(back to top)
LicenseDistributed under the Apache License 2.0. See LICENSE
for more information.
(back to top)
Reporting BugsIf you encounter issues, please create a new issue on GitHub or talk to us on the Unikube Slack channel. When reporting a bug please include the following information:
Gefyra version or Git commit that you're running (gefyra version),
description of the bug and logs from the relevant gefyra
command (if applicable),
steps to reproduce the issue, expected behavior.
If you're reporting a security vulnerability, please follow the process for reporting security issues.
Gefyra is based on well-crafted open source software. Special credits go to the teams of
https://www.linuxserver.io/ and https://git.zx2c4.com/wireguard-go/about/. Please
be sure to check out their awesome work.
Gefyra was heavily inspired by the free part of Telepresence2.
Doge is excited about that.
(back to top)
Twice a month we will interview people behind open source businesses. We will talk about how they are building a business on top of open source projects.
We'll never share your email with anyone else.