Skip to content

Commit

Permalink
docs: update docs with fixes for helm, quickstart and install pages (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-prindle authored Nov 21, 2022
1 parent 77cd91e commit 04d4ce6
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 69 deletions.
142 changes: 122 additions & 20 deletions docs-v2/content/en/docs/install/_index.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,87 @@
---
title: "Installing Skaffold v2.0.0 [NEW]"
linkTitle: "Installing Skaffold v2.0.0 [NEW]"
title: "Installing Skaffold"
linkTitle: "Installing Skaffold"
weight: 10
aliases: [/docs/getting-started]
---

{{< alert title="Note" >}}

To keep Skaffold up to date, update checks are made to Google servers to see if a new version of
Skaffold is available.

You can turn this update check off by following [these instructions]({{<relref "/docs/references/privacy#update-check">}}).

To help prioritize features and work on improving Skaffold, we collect anonymized Skaffold usage data.
You can opt out of data collection by following [these instructions]({{<relref "/docs/resources/telemetry">}}).

Your use of this software is subject to the [Google Privacy Policy](https://policies.google.com/privacy)

{{< /alert >}}

### Managed IDE

{{% tabs %}}

{{% tab "CLOUD CODE" %}}

[Cloud Code](https://cloud.google.com/code) provides a managed experience of using Skaffold in supported IDEs. You can install the `Cloud Code` extension for [Visual Studio Code](https://cloud.google.com/code/docs/vscode/quickstart-k8s#installing) or the plugin for [JetBrains IDEs](https://cloud.google.com/code/docs/intellij/quickstart-k8s#installing_the_plugin). It manages and keeps Skaffold up-to-date, along with other common dependencies, and works with any kubernetes cluster.

{{% /tab %}}

{{% tab "GOOGLE CLOUD SHELL" %}}

Google Cloud Platform's [_Cloud Shell_](http://cloud.google.com/shell)
provides a free [browser-based terminal/CLI and editor](https://cloud.google.com/shell#product-demo)
with Skaffold, Minikube, and Docker pre-installed.
(Requires a [Google Account](https://accounts.google.com/SignUp).)

Cloud Shell is a great way to try Skaffold out.

[![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://ssh.cloud.google.com/cloudshell/editor?shellonly=true&cloudshell_git_repo=https%3A%2F%2Fgithub.com%2FGoogleContainerTools%2Fskaffold&cloudshell_working_dir=examples%2Fgetting-started)

{{% /tab %}}

{{% /tabs %}}

### Standalone binary

{{% tabs %}}

{{% tab "LINUX" %}}
The latest **stable** v2.0.0 beta binaries can be found here:
- Linux x86_64 (amd64): https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-linux-amd64
- Linux ARMv8 (arm64): https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-linux-arm64
The latest **stable** binaries can be found here:

- Linux x86_64 (amd64): https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
- Linux ARMv8 (arm64): https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-arm64

Simply download the appropriate binary and add it to your `PATH`. Or, copy+paste one of the following commands in your terminal:

```bash
# For Linux x86_64 (amd64)
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-linux-amd64 && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 && \
sudo install skaffold /usr/local/bin/
```

```bash
# For Linux ARMv8 (arm64)
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-linux-arm64 && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-arm64 && \
sudo install skaffold /usr/local/bin/
```

We also release a v2.0.0 **bleeding edge** latest build, built from the latest commit:
We also release a **bleeding edge** build, built from the latest commit:

- Linux x86_64 (amd64): https://storage.googleapis.com/skaffold/builds/latest/skaffold-linux-amd64
- Linux ARMv8 (arm64): https://storage.googleapis.com/skaffold/builds/latest/skaffold-linux-arm64

```bash
# For Linux on x86_64 (amd64)
curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/v2.0.0/skaffold-linux-amd64 && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/latest/skaffold-linux-amd64 && \
sudo install skaffold /usr/local/bin/
```

```bash
# For Linux on ARMv8 (arm64)
curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/v2.0.0/skaffold-linux-arm64 && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/latest/skaffold-linux-arm64 && \
sudo install skaffold /usr/local/bin/
```

Expand All @@ -50,24 +91,24 @@ sudo install skaffold /usr/local/bin/

The latest **stable** binaries can be found here:

- Darwin x86_64 (amd64): https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-darwin-amd64
- Darwin ARMv8 (arm64): https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-darwin-arm64
- Darwin x86_64 (amd64): https://storage.googleapis.com/skaffold/releases/latest/skaffold-darwin-amd64
- Darwin ARMv8 (arm64): https://storage.googleapis.com/skaffold/releases/latest/skaffold-darwin-arm64

Simply download the appropriate binary and add it to your `PATH`. Or, copy+paste one of the following commands in your terminal:

```bash
# For macOS on x86_64 (amd64)
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-darwin-amd64 && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-darwin-amd64 && \
sudo install skaffold /usr/local/bin/
```

```bash
# For macOS on ARMv8 (arm64)
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-darwin-arm64 && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-darwin-arm64 && \
sudo install skaffold /usr/local/bin/
```

We also release a v2.0.0 **bleeding edge** build, built from the latest commit:
We also release a **bleeding edge** build, built from the latest commit:

- Darwin x86_64 (amd64): https://storage.googleapis.com/skaffold/builds/latest/skaffold-darwin-amd64
- Darwin ARMv8 (arm64): https://storage.googleapis.com/skaffold/builds/latest/skaffold-darwin-arm64
Expand All @@ -83,32 +124,93 @@ sudo install skaffold /usr/local/bin/
curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/latest/skaffold-darwin-arm64 && \
sudo install skaffold /usr/local/bin/
```
{{% /tab %}}

Skaffold is also kept up to date on a few central package managers:

### Homebrew

```bash
brew install skaffold
```

### MacPorts

```bash
sudo port install skaffold
```

{{% /tab %}}

{{% tab "WINDOWS" %}}

The latest **stable** release binary can be found here:

https://storage.googleapis.com/skaffold/releases/v2.0.0/skaffold-windows-amd64.exe
https://storage.googleapis.com/skaffold/releases/latest/skaffold-windows-amd64.exe

Simply download it and place it in your `PATH` as `skaffold.exe`.

We also release a **bleeding edge** build, built from the latest commit:

https://storage.googleapis.com/skaffold/builds/latest/skaffold-windows-amd64.exe

---

### Scoop

Skaffold can be installed using the [Scoop package manager](https://scoop.sh/)
from the [extras bucket](https://github.com/lukesampson/scoop-extras#readme).
This package is not maintained by the Skaffold team.

```powershell
scoop bucket add extras
scoop install skaffold
```

### Chocolatey

Skaffold can be installed using the [Chocolatey package manager](https://chocolatey.org/packages/skaffold).
This package is not maintained by the Skaffold team.

{{< alert title="Caution" >}}

Chocolatey's installation mechanism interferes with <kbd>Ctrl</kbd>+<kbd>C</kbd> handling
and [prevents Skaffold from cleaning up deployments](https://github.com/GoogleContainerTools/skaffold/issues/4815).
This cannot be fixed by Skaffold.
For more information about this defect see
[chocolatey/shimgen#32](https://github.com/chocolatey/shimgen/issues/32).

{{< /alert >}}

```bash
choco install -y skaffold
```
{{% /tab %}}

{{% tab "GCLOUD" %}}

If you have the Google Cloud SDK installed on your machine, you can quickly install Skaffold as a bundled component.

Make sure your gcloud installation and the components are up to date:

`gcloud components update`

Then, install Skaffold:

`gcloud components install skaffold`

{{% /tab %}}

{{% tab "DOCKER" %}}

### Stable binary

For the latest v2.0.0 beta **stable** release, you can use:
For the latest **stable** release, you can use:

`docker run gcr.io/k8s-skaffold/skaffold/v2:latest skaffold <command>`
`docker run gcr.io/k8s-skaffold/skaffold:latest skaffold <command>`

### Bleeding edge binary

For the latest v2.0.0 **bleeding edge** build:
For the latest **bleeding edge** build:

`docker run gcr.io/k8s-skaffold/skaffold:edge skaffold <command>`

Expand Down
7 changes: 4 additions & 3 deletions docs-v2/content/en/docs/pipeline-stages/deployers/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ Skaffold supports projects set up to render and/or deploy with Helm, but certain
Skaffold no longer requires the intricate configuring of `artifactOverrides` or `imageStrategy` fields. See docs [here]({{< relref "#image-reference-strategies" >}}) on how old `artifactOverrides` and `imageStrategy` values translate to `setValues` entires in the latest Skaffold schemas (`apiVersion: skaffold/v3alpha1` or skaffold binary version `v2.0.0` onwards)
{{< /alert >}}

{{< alert title="In Skaffold `v2` the primary difference between the helm renderer (`manifest.helm.*`) and the helm deployer `deploy.helm.*` is the use of `helm install` vs `helm install`" >}}
{{< alert title="Note" >}}
In Skaffold `v2` the primary difference between the helm renderer (`manifest.helm.*`) and the helm deployer (`deploy.helm.*`) is the use of `helm template` vs `helm install`
{{< /alert >}}

## How `helm` render support works in Skaffold
In the latest version of Skaffold, the primary methods of using `helm` templating with Skaffold involve the `deploy.helm.setValues` and the `deploy.helm.setValueTemplates` fields. `deploy.helm.setValues` supplies the key:value pair to substitute from a users `values.yaml` file (a standard `helm` file for rendering). `deploy.helm.setValueTemplates` does a similar thing only the key:value value comes from an environment variable instead of a given value. The thing to note here is that when using a value that is the same name as an artifact name, that value will be replaced by the fully qualified artifact name (eg: `image: gcr.io/example-repo/skaffold-helm-image:latest@sha256:<sha256-hash>`) for the current build (or the specified value from additional configuration eg: CLI flags or config from `skaffold.yaml`). Depending on how a user's `values.yaml` and charts specify `image: $IMAGE_TEMPLATE`, the docs [here]({{< relref "#image-reference-strategies" >}}) explain the proper `setValues` to use. When migrating from schema version `v2beta29` or less, Skaffold will automatically configure these values to continue to work.


`helm` render support in Skaffold is accomplished by calling `helm install ...` and using the `skaffold` binary as a `helm` `--post-renderer`. This works by having Skaffold run `helm install ...` taking into consideration all of the supplied flags, skaffold.yaml configuration, etc. and creating an intermediate yaml manifest with all helm replacements except that the fully qualified image from the current run is NOT added but instead a placeholder with the artifact name - eg: `skaffold-helm-image`. Then the skaffold post-renderer is called to convert `image: skaffold-helm-image` -> `image: gcr.io/example-repo/skaffold-helm-image:latest@sha256:<sha256-hash>` in specified locations (specific allowlisted k8s objects and/or k8s object fields). This above replacement is nearly identical to how it works for values.yaml files using only the `image` key in `values.yaml` - eg:
`helm` deploy support in Skaffold is accomplished by calling `helm install ...` and using the `skaffold` binary as a `helm` `--post-renderer`. This works by having Skaffold run `helm install ...` taking into consideration all of the supplied flags, skaffold.yaml configuration, etc. and creating an intermediate yaml manifest with all helm replacements except that the fully qualified image from the current run is NOT added but instead a placeholder with the artifact name - eg: `skaffold-helm-image`. Then the skaffold post-renderer is called to convert `image: skaffold-helm-image` -> `image: gcr.io/example-repo/skaffold-helm-image:latest@sha256:<sha256-hash>` in specified locations (specific allowlisted k8s objects and/or k8s object fields). This above replacement is nearly identical to how it works for values.yaml files using only the `image` key in `values.yaml` - eg:
`image: "{{.Values.image}}"`

When using `image.repoistory` + `image.tag` or `image.registry` + `image.repository` + `image.tag` - eg:
Expand Down Expand Up @@ -249,7 +250,7 @@ spec:

Skaffold will invoke
```
helm install <chart> <chart-path> --set-string image.registry=<artifact-name>,image.repository=<artifact-name>,tag=<artifcact-name> --post-renderer=<path-to-skaffold-binary-from-original-invocation>
helm install <chart> <chart-path> --set-string image.registry=<artifact-name>,image.repository=<artifact-name>,image.tag=<artifact-name>,image2.registry=<artifact-name>,image2.repository=<artifact-name>,image2.tag=<artifcact-name> --post-renderer=<path-to-skaffold-binary-from-original-invocation>
```

### Helm Build Dependencies
Expand Down
5 changes: 3 additions & 2 deletions docs-v2/content/en/docs/pipeline-stages/renderers/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ Skaffold supports projects set up to render and/or deploy with Helm, but certain
Skaffold no longer requires the intricate configuring of `artifactOverrides` or `imageStrategy` fields. See docs [here]({{< relref "#image-reference-strategies" >}}) on how old `artifactOverrides` and `imageStrategy` values translate to `setValues` entires in the latest Skaffold schemas (`apiVersion: skaffold/v3alpha1` or skaffold binary version `v2.0.0` onwards)
{{< /alert >}}

{{< alert title="In Skaffold `v2` the primary difference between the helm renderer (`manifest.helm.*`) and the helm deployer `deploy.helm.*` is the use of `helm template` vs `helm install`" >}}
{{< alert title="Note" >}}
In Skaffold `v2` the primary difference between the helm renderer (`manifest.helm.*`) and the helm deployer (`deploy.helm.*`) is the use of `helm template` vs `helm install`
{{< /alert >}}

## How `helm` render support works in Skaffold
Expand Down Expand Up @@ -249,7 +250,7 @@ spec:

Skaffold will invoke
```
helm template <chart> <chart-path> --set-string image.registry=<artifact-name>,image.repository=<artifact-name>,tag=<artifcact-name> --post-renderer=<path-to-skaffold-binary-from-original-invocation>
helm template <chart> <chart-path> --set-string image.registry=<artifact-name>,image.repository=<artifact-name>,image.tag=<artifact-name>,image2.registry=<artifact-name>,image2.repository=<artifact-name>,image2.tag=<artifact-name> --post-renderer=<path-to-skaffold-binary-from-original-invocation>
```

### Helm Build Dependencies
Expand Down
8 changes: 7 additions & 1 deletion docs-v2/content/en/docs/quickstart/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ weight: 20
{{% tab "STANDALONE" %}}

Follow this tutorial if you're using the Skaffold [standalone binary]({{< relref "../install/#standalone-binary" >}}). It walks through running Skaffold on a small Kubernetes app built with [Docker](https://www.docker.com/) inside [minikube](https://minikube.sigs.k8s.io)
and deployed with [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)! To learn how to generate a new project with previously built-in structure and features, see the [Google Cloud Solutions Template](https://github.com/GoogleCloudPlatform/solutions-template).
and deployed with [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)!

{{< alert title="Note" >}}
If you are looking to generate a new project templated to use Skaffold best-practicees and features, see the [Google Cloud Solutions Template](https://github.com/GoogleCloudPlatform/solutions-template).
{{< /alert >}}



This tutorial uses minikube as Skaffold knows how to build the app using the Docker daemon hosted
inside minikube and thus avoiding any need for a registry to host the app's container images.
Expand Down
Loading

0 comments on commit 04d4ce6

Please sign in to comment.