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:
@@ -45,7 +45,7 @@ spec:
|
|||||||
value: {{ tpl .Values.taint.value $ }}
|
value: {{ tpl .Values.taint.value $ }}
|
||||||
- name: VKUBELET_TAINT_EFFECT
|
- name: VKUBELET_TAINT_EFFECT
|
||||||
value: {{ .Values.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 }}
|
{{- with .Values.providers.azure }}
|
||||||
{{- if .loganalytics.enabled }}
|
{{- if .loganalytics.enabled }}
|
||||||
- name: LOG_ANALYTICS_AUTH_LOCATION
|
- name: LOG_ANALYTICS_AUTH_LOCATION
|
||||||
@@ -113,7 +113,7 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: credentials
|
- name: credentials
|
||||||
mountPath: "/etc/virtual-kubelet"
|
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 }}
|
{{- if .Values.providers.azure.targetAKS }}
|
||||||
- name: acs-credential
|
- name: acs-credential
|
||||||
mountPath: "/etc/acs/azure.json"
|
mountPath: "/etc/acs/azure.json"
|
||||||
@@ -124,7 +124,7 @@ spec:
|
|||||||
{{- if not .Values.taint.enabled }}
|
{{- if not .Values.taint.enabled }}
|
||||||
"--disable-taint", "true",
|
"--disable-taint", "true",
|
||||||
{{- end }}
|
{{- end }}
|
||||||
"--provider", "{{ required "provider is required" .Values.provider }}",
|
"--provider", "{{ required "You must specify a Virtual Kubelet provider" .Values.provider }}",
|
||||||
"--namespace", "{{ .Values.monitoredNamespace }}",
|
"--namespace", "{{ .Values.monitoredNamespace }}",
|
||||||
"--nodename", "{{ required "nodeName is required" .Values.nodeName }}",
|
"--nodename", "{{ required "nodeName is required" .Values.nodeName }}",
|
||||||
{{- if .Values.logLevel }}
|
{{- if .Values.logLevel }}
|
||||||
@@ -146,7 +146,7 @@ spec:
|
|||||||
- name: credentials
|
- name: credentials
|
||||||
secret:
|
secret:
|
||||||
secretName: {{ template "vk.fullname" . }}
|
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 }}
|
{{- if .Values.providers.azure.targetAKS }}
|
||||||
- name: acs-credential
|
- name: acs-credential
|
||||||
hostPath:
|
hostPath:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ data:
|
|||||||
cert.pem: {{ quote .Values.apiserverCert }}
|
cert.pem: {{ quote .Values.apiserverCert }}
|
||||||
key.pem: {{ quote .Values.apiserverKey }}
|
key.pem: {{ quote .Values.apiserverKey }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if eq .Values.provider "azure" }}
|
{{- if eq (required "You must specify a Virtual Kubelet provider" .Values.provider) "azure" }}
|
||||||
{{- with .Values.providers.azure }}
|
{{- with .Values.providers.azure }}
|
||||||
{{- if .loganalytics.enabled }}
|
{{- 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 }}
|
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 }}
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ image:
|
|||||||
tag: latest
|
tag: latest
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
|
|
||||||
## `provider` should be one of aws, azure, azurebatch, etc...
|
|
||||||
provider:
|
|
||||||
nodeName: "virtual-kubelet"
|
nodeName: "virtual-kubelet"
|
||||||
nodeOsType: "Linux"
|
nodeOsType: "Linux"
|
||||||
monitoredNamespace: ""
|
monitoredNamespace: ""
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
=border
|
=border
|
||||||
border: 1px solid $grey-light
|
border: 1px solid $grey-lighter
|
||||||
|
|
||||||
.cli
|
.cli
|
||||||
+border
|
+border
|
||||||
@@ -36,7 +36,10 @@
|
|||||||
&-flags
|
&-flags
|
||||||
+border
|
+border
|
||||||
padding: 1rem
|
padding: 1rem
|
||||||
overflow: scroll
|
overflow: scroll
|
||||||
|
|
||||||
|
table thead tr th:first-of-type
|
||||||
|
min-width: 30%
|
||||||
|
|
||||||
.flag
|
.flag
|
||||||
font-family: $family-code
|
font-family: $family-code
|
||||||
@@ -44,3 +47,4 @@
|
|||||||
|
|
||||||
.arg
|
.arg
|
||||||
color: $dark
|
color: $dark
|
||||||
|
font-weight: 700
|
||||||
|
|||||||
@@ -135,6 +135,10 @@ blockquote
|
|||||||
margin-top: .8rem
|
margin-top: .8rem
|
||||||
|
|
||||||
.content
|
.content
|
||||||
|
blockquote
|
||||||
|
code
|
||||||
|
background-color: $white-bis
|
||||||
|
|
||||||
figure
|
figure
|
||||||
img
|
img
|
||||||
figcaption
|
figcaption
|
||||||
|
|||||||
@@ -4,19 +4,19 @@ description: Run a Virtual Kubelet inside or outside of your Kubernetes cluster
|
|||||||
weight: 2
|
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}
|
## 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:
|
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
|
```bash
|
||||||
virtual-kubelet --provider aws
|
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
|
<!-- The CLI docs are generated using the shortcode in layouts/shortcodes/cli.html
|
||||||
and the YAML config in data/cli.yaml
|
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.
|
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
|
||||||
|
```
|
||||||
|
|||||||
12
website/layouts/partials/admonition.html
Normal file
12
website/layouts/partials/admonition.html
Normal 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>
|
||||||
1
website/layouts/shortcodes/danger.html
Normal file
1
website/layouts/shortcodes/danger.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{{ partial "admonition.html" (dict "type" "danger" "icon" "ban" "content" .Inner) }}
|
||||||
1
website/layouts/shortcodes/info.html
Normal file
1
website/layouts/shortcodes/info.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{{ partial "admonition.html" (dict "type" "info" "icon" "info-circle" "content" .Inner) }}
|
||||||
1
website/layouts/shortcodes/requirement.html
Normal file
1
website/layouts/shortcodes/requirement.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{{ partial "admonition.html" (dict "type" "requirement" "icon" "wrench" "content" .Inner) }}
|
||||||
1
website/layouts/shortcodes/success.html
Normal file
1
website/layouts/shortcodes/success.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{{ partial "admonition.html" (dict "type" "success" "icon" "check-circle" "content" .Inner) }}
|
||||||
1
website/layouts/shortcodes/warning.html
Normal file
1
website/layouts/shortcodes/warning.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{{ partial "admonition.html" (dict "type" "warning" "icon" "exclamation" "content" .Inner) }}
|
||||||
Reference in New Issue
Block a user