Skip to content

Commit

Permalink
docs: Improve snap install docs (#984)
Browse files Browse the repository at this point in the history
Fix the snap install docs

---------

Co-authored-by: eaudetcobello <etienne.audet-cobello@canonical.com>
  • Loading branch information
mateoflorido and eaudetcobello authored Jan 17, 2025
1 parent c2660f5 commit ea8ee43
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 29 deletions.
25 changes: 12 additions & 13 deletions docs/src/snap/howto/install/multipass.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Install with Multipass (Ubuntu/Mac/Windows)
# Install with Multipass (Ubuntu/macOS/Windows)

[Multipass][]is a simple way to run Ubuntu in a
virtual machine, no matter what your underlying OS. It is the recommended way
to run {{product}} on Windows and macOS systems, and is equally useful
for running multiple instances of the `k8s` snap on Ubuntu too.
[Multipass] provides an easy way to run Ubuntu in a virtual machine, regardless
of your underlying operating system. It is the recommended way to run
{{product}} on Windows and macOS systems, and is equally useful for running
multiple instances of the `k8s` snap on Ubuntu too.

## Install Multipass

Expand All @@ -13,8 +13,8 @@ Choose your OS for the install procedure
```{group-tab} Ubuntu/Linux
Multipass is shipped as a snap for Ubuntu and other OSes which support the
[snap package system][snap-support].
Multipass is shipped as a snap for Ubuntu and other Linux distributions which
support the [snap package system][snap-support].
sudo snap install multipass
Expand All @@ -26,8 +26,8 @@ Multipass is shipped as a snap for Ubuntu and other OSes which support the
Windows users should download and install the Multipass installer from the
website.
The [latest Windows version][] is available to download,
though you may wish to visit the [Multipass website][] for more details.
The [latest Windows version][] is available to download, though you may wish
to visit the [Multipass website][] for more details.
```
Expand Down Expand Up @@ -55,12 +55,12 @@ and 20G of disk space for each instance.
Open a terminal (or Shell on Windows) and enter the following command:

```
multipass launch 22.04 --name k8s-node --memory 4G --disk 20G --cpus 2
multipass launch 24.04 --name k8s-node --memory 4G --disk 20G --cpus 2
```

This command specifies:

- `22.04`: The Ubuntu image used as the basis for the instance
- `24.04`: The Ubuntu image used as the base for the instance
- `--name`: The name by which you will refer to the instance
- `--memory`: The memory to allocate
- `--disk`: The disk space to allocate
Expand Down Expand Up @@ -105,8 +105,7 @@ multipass stop k8s-node
And it can be permanently removed with:

```
multipass delete k8s-node
multipass purge
multipass delete k8s-node --purge
```

<!-- LINKS -->
Expand Down
32 changes: 16 additions & 16 deletions docs/src/snap/howto/install/offline.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Installing {{product}} in air-gapped environments

There are situations where it is necessary or desirable to run Canonical
Kubernetes on a machine that is not connected to the internet. Based on
different degrees of separation from the network, different solutions are
offered to accomplish this goal. This guide documents any necessary extra
preparation for air-gap deployments, as well the steps that are needed to
successfully deploy {{product}} in such environments.
There are situations where it is necessary or desirable to run {{product}}
on a machine that is not connected to the internet. Based on different degrees
of separation from the network, different solutions are offered to accomplish
this goal. This guide documents any necessary extra preparation for air-gap
deployments, as well the steps that are needed to successfully deploy
{{product}} in such environments.

## Prepare for Deployment
## Prepare for deployment

In preparation for the offline deployment download the Canonical
Kubernetes snap, fulfil the networking requirements based on your scenario and
handle images for workloads and {{product}} features.
In preparation for the offline deployment download the {{product}} snap,
fulfil the networking requirements based on your scenario and handle images for
workloads and {{product}} features.

### Download the {{product}} snap

Expand All @@ -28,7 +28,7 @@ Besides the snaps, this will also download the corresponding assert files which
are necessary to verify the integrity of the packages.

```{note}
Update the version of k8s by adjusting the channel parameter.
Update the version of `k8s` by adjusting the channel parameter.
For more information on channels visit the
[channels explanation](../../explanation/channels.md).
```
Expand All @@ -38,7 +38,7 @@ Future updates to the `k8s` snap may require a different version of the core
snap.
```

### Network Requirements
### Network requirements

Air-gap deployments are typically associated with a number of constraints and
restrictions when it comes to the networking connectivity of the machines.
Expand Down Expand Up @@ -126,7 +126,7 @@ ghcr.io/canonical/rawfile-localpv:0.8.1
```

A list of images can also be found in the `images.txt` file when the
downloaded k8s snap is unsquashed.
downloaded `k8s` snap is unsquashed.

Please ensure that the images used by workloads are tracked as well.

Expand Down Expand Up @@ -263,7 +263,7 @@ create a `hosts.toml` file. Here's an example that configures

##### HTTP registry

In `/var/snap/k8s/common/etc/containerd/hosts.d/ghcr.io/hosts.toml`
In `/etc/containerd/hosts.d/ghcr.io/hosts.toml`
add the configuration:

```
Expand All @@ -275,9 +275,9 @@ capabilities = ["pull", "resolve"]

HTTPS requires the additionally specification of the registry CA certificate.
Copy the certificate to
`/var/snap/k8s/common/etc/containerd/hosts.d/ghcr.io/ca.crt`.
`/etc/containerd/hosts.d/ghcr.io/ca.crt`.
Then add the configuration in
`/var/snap/k8s/common/etc/containerd/hosts.d/ghcr.io/hosts.toml`:
`/etc/containerd/hosts.d/ghcr.io/hosts.toml`:

```
[host."https://10.10.10.10:5050"]
Expand Down

0 comments on commit ea8ee43

Please sign in to comment.