documentation: cleanup cobra help, add environment and config information to README
This commit is contained in:
committed by
Erik St. Martin
parent
0dadbd7898
commit
bfa5f4e1b9
43
README.md
43
README.md
@@ -41,6 +41,35 @@ Run the binary with your chosen provider:
|
||||
Now that the virtual-kubelet is deployed run `kubectl get nodes` and you should see
|
||||
a `virtual-kubelet` node.
|
||||
|
||||
## Command Line Usage
|
||||
|
||||
```bash
|
||||
virtual-kubelet implements the Kubelet interface with a pluggable
|
||||
backend implementation allowing users to create kubernetes nodes without running the kubelet.
|
||||
This allows users to schedule kubernetes workloads on nodes that aren't running Kubernetes.
|
||||
|
||||
Usage:
|
||||
virtual-kubelet [flags]
|
||||
virtual-kubelet [command]
|
||||
|
||||
Available Commands:
|
||||
help Help about any command
|
||||
version A brief description of your command
|
||||
|
||||
Flags:
|
||||
-h, --help help for virtual-kubelet
|
||||
--kubeconfig string config file (default is $HOME/.kube/config)
|
||||
--namespace string kuberentes namespace (default is 'all')
|
||||
--nodename string kubernetes node name (default "virtual-kubelet")
|
||||
--os string Operating System (Linux/Windows) (default "Linux")
|
||||
--provider string cloud provider
|
||||
--provider-config string cloud provider configuration file
|
||||
--taint string apply taint to node, making scheduling explicit
|
||||
-t, --toggle Help message for toggle
|
||||
|
||||
Use "virtual-kubelet [command] --help" for more information about a command.
|
||||
```
|
||||
|
||||
## Providers
|
||||
|
||||
This project features a pluggable provider interface developers can implement
|
||||
@@ -50,6 +79,8 @@ This enables on-demand and nearly instantaneous container compute, orchestrated
|
||||
by Kubernetes, without having VM infrastructure to manage and while still
|
||||
leveraging the portable Kubernetes API.
|
||||
|
||||
Each provider may have its own configuration file, and required environmental variables.
|
||||
|
||||
### Azure Container Instances Provider
|
||||
|
||||
The Azure Container Instances Provider allows you to utilize both
|
||||
@@ -60,6 +91,18 @@ same Kubernetes cluster.
|
||||
./bin/virtual-kubelet --provider azure
|
||||
```
|
||||
|
||||
#### Environment Variables
|
||||
|
||||
`ACI_RESOURCE_GROUP` must be set to the name of a valid Azure resource group where your
|
||||
ACI workload will be run.
|
||||
|
||||
`ACI_REGION` must be set to the name of the region your `ACI_RESOURCE_GROUP` was created.
|
||||
|
||||
#### Configuration File
|
||||
|
||||
The Azure connector can use a configuration file specified by the `--provider-config` flag.
|
||||
The config file is in TOML format, and an example lives in `providers/azure/example.toml`.
|
||||
|
||||
### Hyper.sh Provider
|
||||
|
||||
The Hyper.sh Provider allows Kubernetes clusters to deploy Hyper.sh containers
|
||||
|
||||
12
cmd/root.go
12
cmd/root.go
@@ -41,14 +41,12 @@ var taint string
|
||||
// RootCmd represents the base command when called without any subcommands
|
||||
var RootCmd = &cobra.Command{
|
||||
Use: "virtual-kubelet",
|
||||
Short: "A brief description of your application",
|
||||
Long: `A longer description that spans multiple lines and likely contains
|
||||
examples and usage of using your application. For example:
|
||||
|
||||
Cobra is a CLI library for Go that empowers applications.
|
||||
This application is a tool to generate the needed files
|
||||
to quickly create a Cobra application.`,
|
||||
Short: "virtual-kubelet provides a virtual kubelet interface for your kubernetes cluster.",
|
||||
Long: `virtual-kubelet implements the Kubelet interface with a pluggable
|
||||
backend implementation allowing users to create kubernetes nodes without running the kubelet.
|
||||
This allows users to schedule kubernetes workloads on nodes that aren't running Kubernetes.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println(kubeConfig)
|
||||
f, err := vkubelet.New(nodeName, operatingSystem, kubeNamespace, kubeConfig, taint, provider, providerConfig)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user