KubeFox

build release Go Report
Card

KubeFox is an SDK, platform and infrastructure to enable rapid construction and deployment of secure and robust applications for Kubernetes, and which drastically reduces bureaucracy and burdensome DevOps activities.

Teams and even individual developers can create and rapidly prototype code on the same cluster in what appear to be individual sandboxes. Behind the scenes, KubeFox provides the following capabilities:

Getting Started and Documentation

The best way to get started with KubeFox is to go through our Quickstart and read through our docs. The Quickstart currently supports kind and Microsoft Azure. The Quickstart can be navigated in less than a half hour and gives you a good overview of the power of KubeFox.

Local Development

This will help get your workstation setup for local development, allowing you to run a local instance of the broker and httpsrv with a debugger. First, create a new kind cluster.

kind create cluster --wait 5m
export BRANCH=$(git rev-parse --abbrev-ref HEAD)

Then, build all the components and load their container images into the kind cluster.

make all KIND_LOAD=true VERSION="${BRANCH}"

Now, install the KubeFox Operator using the current branch name as the image tag.

helm install kubefox kubefox \
    --repo https://xigxog.github.io/helm-charts \
    --create-namespace --namespace kubefox-system \
    --set log.format=console --set log.level=debug --set image.tag="${BRANCH}" \
    --wait

Next, create a new directory and initialize a KubeFox App with Fox. When prompted to initialize the hello-world App respond with y and for the Platform name enter debug and press Enter to accept the default namespace of kubefox-debug. The name and namespace must match exactly for the local development environment to work.

export FOX_INFO=true && \
    mkdir -p /tmp/kubefox/hello-world && \
    cd /tmp/kubefox/hello-world && \
    fox init && \
    fox publish --wait 5m && \
    kubectl apply -f ./hack/environments/ -n kubefox-debug ; \
    cd -

The output should look something like this.

info    Let's initialize a KubeFox App!

info    To get things started quickly 🦊 Fox can create a 'hello-world' KubeFox App which
info    includes two components and example environments for testing.
Would you like to initialize the 'hello-world' KubeFox App? [y/N] y
Enter URL for remote Git repo (default 'https://github.com/xigxog/hello-world.git'):

info    You need to have a KubeFox Platform instance running to deploy your components.
info    Don't worry, 🦊 Fox can create one for you.
Would you like to create a KubeFox Platform? [Y/n] y
Enter the KubeFox Platform's name (required): debug
Enter the Kubernetes namespace of the KubeFox Platform (default 'kubefox-debug'):

Great! Now that there is a local instance you just need to enable debug mode and start the broker locally. There is a script that takes care of updating the Platform and setting up port forwards to your workstation for Vault and NATS.

make debug

If everything went smoothly you can now start local instances of the broker and httpsrv using the commands provided by make debug. Or if using VSCode you can start the launch configurations named broker and httpsrv. Once both are started use curl to perform a request and you should see corresponding log output in the debug console.

curl -v "http://localhost:8080/qa/hello?kf-dep=hello-world-main&kf-ve=qa"

License

XigXog is committed to open source and our software is licensed under the Mozilla Public License Version 2.0.