Add Helm documentation (#517)

* Add required blocks to Helm templates

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Make CLI table border lighter

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Change aesthetic of CLI table

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Add admonition blocks

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Fix wording

Signed-off-by: lucperkins <lucperkins@gmail.com>
This commit is contained in:
Luc Perkins
2019-03-28 15:30:30 -07:00
committed by Brian Goff
parent bf420eac41
commit 561ccca561
12 changed files with 74 additions and 13 deletions

View File

@@ -45,7 +45,7 @@ spec:
value: {{ tpl .Values.taint.value $ }}
- name: VKUBELET_TAINT_EFFECT
value: {{ .Values.taint.effect }}
{{- if eq .Values.provider "azure" }}
{{- if eq (required "You must specify a Virtual Kubelet provider" .Values.provider) "azure" }}
{{- with .Values.providers.azure }}
{{- if .loganalytics.enabled }}
- name: LOG_ANALYTICS_AUTH_LOCATION
@@ -113,7 +113,7 @@ spec:
volumeMounts:
- name: credentials
mountPath: "/etc/virtual-kubelet"
{{- if eq .Values.provider "azure" }}
{{- if eq (required "You must specify a Virtual Kubelet provider" .Values.provider) "azure" }}
{{- if .Values.providers.azure.targetAKS }}
- name: acs-credential
mountPath: "/etc/acs/azure.json"
@@ -124,7 +124,7 @@ spec:
{{- if not .Values.taint.enabled }}
"--disable-taint", "true",
{{- end }}
"--provider", "{{ required "provider is required" .Values.provider }}",
"--provider", "{{ required "You must specify a Virtual Kubelet provider" .Values.provider }}",
"--namespace", "{{ .Values.monitoredNamespace }}",
"--nodename", "{{ required "nodeName is required" .Values.nodeName }}",
{{- if .Values.logLevel }}
@@ -146,7 +146,7 @@ spec:
- name: credentials
secret:
secretName: {{ template "vk.fullname" . }}
{{- if eq .Values.provider "azure" }}
{{- if eq (required "You must specify a Virtual Kubelet provider" .Values.provider) "azure" }}
{{- if .Values.providers.azure.targetAKS }}
- name: acs-credential
hostPath:

View File

@@ -17,7 +17,7 @@ data:
cert.pem: {{ quote .Values.apiserverCert }}
key.pem: {{ quote .Values.apiserverKey }}
{{- end }}
{{- if eq .Values.provider "azure" }}
{{- if eq (required "You must specify a Virtual Kubelet provider" .Values.provider) "azure" }}
{{- with .Values.providers.azure }}
{{- if .loganalytics.enabled }}
loganalytics.json: {{ printf "{\"workspaceID\": \"%s\",\"workspaceKey\": \"%s\"}" (required "workspaceId is required for loganalytics" .loganalytics.workspaceId ) (required "workspaceKey is required for loganalytics" .loganalytics.workspaceKey ) | b64enc | quote }}

View File

@@ -3,8 +3,6 @@ image:
tag: latest
pullPolicy: Always
## `provider` should be one of aws, azure, azurebatch, etc...
provider:
nodeName: "virtual-kubelet"
nodeOsType: "Linux"
monitoredNamespace: ""

View File

@@ -1,5 +1,5 @@
=border
border: 1px solid $grey-light
border: 1px solid $grey-lighter
.cli
+border
@@ -36,7 +36,10 @@
&-flags
+border
padding: 1rem
overflow: scroll
overflow: scroll
table thead tr th:first-of-type
min-width: 30%
.flag
font-family: $family-code
@@ -44,3 +47,4 @@
.arg
color: $dark
font-weight: 700

View File

@@ -135,6 +135,10 @@ blockquote
margin-top: .8rem
.content
blockquote
code
background-color: $white-bis
figure
img
figcaption

View File

@@ -4,19 +4,19 @@ description: Run a Virtual Kubelet inside or outside of your Kubernetes cluster
weight: 2
---
Virtual Kubelet is run via the `virtual-kubelet` command-line tool (documented [below](#virtual-kubelet-cli)). You can run Virtual Kubelet either [outside](#outside-k8s) or [inside](#inside-k8s) of a Kubernetes cluster.
You can Virtual Kubelet either [outside](#outside-k8s) or [inside](#inside-k8s) of a Kubernetes cluster using the [`virtual-kubelet`](#virtual-kubelet-cli) command-line tool. If you run Virtual Kubelet inside of a Kubernetes cluster, you can also deploy it using [Helm](#helm).
> For `virtual-kubelet` installation instructions, see the [Setup](../setup) guide.
## Outside of a Kubernetes cluster {#outside-k8s}
> Before you go through this section, make sure to [install Virtual Kubelet](../setup) first.
To run Virtual Kubelet outside of a Kubernetes cluster, run the [`virtual-kubelet`](#virtual-kubelet-cli) binary with your chosen [provider](../providers). Here's an example:
```bash
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`](#virtual-kubelet-cli) flag).
Once 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`](#virtual-kubelet-cli) flag).
<!-- The CLI docs are generated using the shortcode in layouts/shortcodes/cli.html
and the YAML config in data/cli.yaml
@@ -53,3 +53,41 @@ make skaffold MODE=run
```
This will build and deploy the Virtual Kubelet and return.
## Helm
{{< info >}}
[Helm](https://helm.sh) is a package manager that enables you to easily deploy complex systems on Kubernetes using configuration bundles called [Charts](https://docs.helm.sh/developing_charts/).
{{< /info >}}
You can use the Virtual Kubelet [Helm chart](https://github.com/virtual-kubelet/virtual-kubelet/tree/master/charts) to deploy Virtual Kubelet on Kubernetes.
First, add the Chart repository (the Chart is currently hosted on [GitHub](https://github.com)):
```bash
helm repo add virtual-kubelet \
https://raw.githubusercontent.com/virtual-kubelet/virtual-kubelet/master/charts
```
{{< success >}}
You can check to make sure that the repo is listed amongst your current repos using `helm repo list`.
{{< /success >}}
Now you can install Virtual Kubelet using `helm install`. Here's an example command:
```bash
helm install virtual-kubelet/virtual-kubelet \
--name virtual-kubelet-azure \
--namespace virtual-kubelet \
--set provider=azure
```
This would install the [Azure Container Instances Virtual Kubelet](https://github.com/virtual-kubelet/virtual-kubelet/tree/master/providers/azure) in the `virtual-kubelet` namespace.
To verify that Virtual Kubelet has been installed, run this command, which will list the available nodes and watch for changes:
```bash
kubectl get nodes \
--namespace virtual-kubelet \
--watch
```

View File

@@ -0,0 +1,12 @@
<div class="notification is-{{ .type }}">
<article class="media">
<div class="media-left">
<span class="icon">
<i class="fas fa-lg fa-{{ .icon }}"></i>
</span>
</div>
<div class="media-content">
{{ .content | markdownify }}
</div>
</article>
</div>

View File

@@ -0,0 +1 @@
{{ partial "admonition.html" (dict "type" "danger" "icon" "ban" "content" .Inner) }}

View File

@@ -0,0 +1 @@
{{ partial "admonition.html" (dict "type" "info" "icon" "info-circle" "content" .Inner) }}

View File

@@ -0,0 +1 @@
{{ partial "admonition.html" (dict "type" "requirement" "icon" "wrench" "content" .Inner) }}

View File

@@ -0,0 +1 @@
{{ partial "admonition.html" (dict "type" "success" "icon" "check-circle" "content" .Inner) }}

View File

@@ -0,0 +1 @@
{{ partial "admonition.html" (dict "type" "warning" "icon" "exclamation" "content" .Inner) }}