Firekube is a Kubernetes cluster working on top of ignite and firecracker. Firekube clusters are operated with GitOps.
ignite and firecracker only work on Linux as they need KVM. Fortunately we will also work on macOS using footloose: the Kubernetes nodes are then running inside containers.
Prerequisites: docker, git, kubectl 1.14+.
-
Fork this repository.
-
Clone your fork and
cd
into it. Use theSSH
git URL as the script will push an initial commit to your fork:export user="" # Your GitHub handle or org git clone git@github.com:$user/wks-quickstart-firekube.git cd wks-quickstart-firekube
-
Start the cluster:
./setup.sh
This step will take several minutes.
Please note that the
setup.sh
script will detect which OS you're on. If it's macOS, the script will automatically setbackend: docker
insideconfig.yaml
. This config is to start the cluster in containers as there is no KVM on macOS. However, Firekube on Linux will run either withbackend: ignite
(ignite VMs) orbackend: docker
(containers). So thesetup.sh
script won't touch the backend value insideconfig.yaml
if you're on Linux. In case you started Firekube (in containers) on macOS then switched to try it on Linux, please make sure that the backend value is set tobackend: ignite
so that you can start the cluster on ignite / firecracker VMs. -
Export the
KUBECONFIG
environment variable as indicated at the end of the installation:export KUBECONFIG=/home/damien/.wks/weavek8sops/example/kubeconfig
Enjoy your Kubernetes cluster!
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
67bb6c4812b19ce4 Ready master 3m42s v1.14.1
a5cf619fa058882d Ready <none> 75s v1.14.1
Now that we have a cluster installed, we can commit Kubernetes objects to the git repository and have them appear in the cluster. Let's add podinfo, an example Go microservice, to the cluster.
kubectl apply --dry-run -k github.com/stefanprodan/podinfo//kustomize -o yaml > podinfo.yaml
git add podinfo.yaml
git commit -a -m 'Add podinfo Deployment'
git push
A few seconds later, you should witness the apparition of a podinfo pod in the cluster:
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
podinfo-677768c755-z76xk 1/1 Running 0 30s
To view podinfo
web UI:
-
Expose
podinfo
locally:kubectl port-forward deploy/podinfo 9898:9898
-
Point your browser to
http://127.0.0.1:9898
:
Run:
./cleanup.sh
To use a private git repository instead of a fork of wks-quickstart-firekube
:
-
Create a private repository and push the
wks-quickstart-firekube
master
branch there. Use the SSH git URL when cloning the private repository:git clone git@github.com:$user/$repository.git cd $repository git remote add quickstart git@github.com:weaveworks/wks-quickstart-firekube.git git fetch quickstart git merge quickstart/master git push
-
Create an SSH key pair:
ssh-keygen -t rsa -b 4096 -C "damien+firekube@weave.works" -f deploy-firekube -N ""
-
Upload the deploy key to your private repository (with read/write access):
-
Start the cluster:
./setup.sh --git-deploy-key ./deploy-firekube
If you have any questions about, feedback for or problems with wks-quickstart-firekube
:
- Invite yourself to the Weave Users Slack.
- Ask a question on the #general slack channel.
- File an issue.
- Join the discussion
- Invite yourself to the Weave community Slack
- Ask a question on the #firekube Slack channel
Your feedback is always welcome!