* Add setup and usage docs Signed-off-by: lucperkins <lucperkins@gmail.com> * Finish initial version of setup doc * Add YAML config file for CLI docs * Finish CLI shortcode Signed-off-by: lucperkins <lucperkins@gmail.com> * Fix scrolling on mobile Signed-off-by: lucperkins <lucperkins@gmail.com> * Finish first version of usage doc Signed-off-by: lucperkins <lucperkins@gmail.com> * Remove go install section, modify CSS for CLI docs, and fix typo Signed-off-by: lucperkins <lucperkins@gmail.com>
2.7 KiB
title, description, weight
| title | description | weight |
|---|---|---|
| Usage | Run a Virtual Kubelet inside or outside of your Kubernetes cluster | 2 |
Virtual Kubelet is run via the virtual-kubelet command-line tool (documented below). You can run Virtual Kubelet either outside or inside of a Kubernetes cluster.
Outside of a Kubernetes cluster
Before you go through this section, make sure to install Virtual Kubelet first.
To run Virtual Kubelet outside of a Kubernetes cluster, run the virtual-kubelet binary with your chosen provider. Here's an example:
virtual-kubelet --provider aws
Once the Virtual Kubelet is deployed, run kubectl get nodes and you should see a virtual-kubelet node (unless you've named it something else using the --nodename flag).
{{< cli >}}
Inside a Kubernetes cluster
It's possible to run the Virtual Kubelet as a Kubernetes Pod inside a Minikube or Docker for Desktop Kubernetes cluster.
At this time, automation of this deployment is supported only for the
mockprovider.
In order to deploy the Virtual Kubelet, you need to install Skaffold, a Kubernetes development tool. You also need to make sure that your current kubectl context is either minikube or docker-for-desktop (depending on which Kubernetes platform you're using).
First, clone the Virtual Kubelet repository:
git clone https://github.com/virtual-kubelet/virtual-kubelet
cd virtual-kubelet
Then:
make skaffold
By default, this will run Skaffold in development mode, which will make Skaffold watch hack/skaffold/virtual-kubelet/Dockerfile and its dependencies for changes and re-deploy the Virtual Kubelet when changes happen. It will also make Skaffold stream logs from the Virtual Kubelet Pod.
Alternative, you can run Skaffold outside of development mode—if you aren't concerned about continuous deployment and log streaming—by running:
make skaffold MODE=run
This will build and deploy the Virtual Kubelet and return.