Skip to content

Commit

Permalink
docs: update docs for 0.12
Browse files Browse the repository at this point in the history
Plus remove versions in a few places.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
  • Loading branch information
AlekSi authored and talos-bot committed Jul 9, 2021
1 parent 6fbec9e commit 679b08f
Show file tree
Hide file tree
Showing 20 changed files with 74 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Using the DNS name of the load balancer, generate the base configuration files f
```bash
$ talosctl gen config talos-k8s-metal-tutorial https://<load balancer IP or DNS>:<port>
created controlplane.yaml
created join.yaml
created worker.yaml
created talosconfig
```

Expand All @@ -43,8 +43,8 @@ Optionally, you can specify `--config-patch` with RFC6902 jsonpatch which will b
```bash
$ talosctl validate --config controlplane.yaml --mode metal
controlplane.yaml is valid for metal mode
$ talosctl validate --config join.yaml --mode metal
join.yaml is valid for metal mode
$ talosctl validate --config worker.yaml --mode metal
worker.yaml is valid for metal mode
```

#### Publishing the Machine Configuration Files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@ Using the DNS name of the loadbalancer created earlier, generate the base config
```bash
$ talosctl gen config talos-k8s-aws-tutorial https://<load balancer IP or DNS>:<port>
created controlplane.yaml
created join.yaml
created worker.yaml
created talosconfig
```

Now add the required shebang (e.g. `#!talos`) at the top of `controlplane.yaml`, and `join.yaml`
Now add the required shebang (e.g. `#!talos`) at the top of `controlplane.yaml`, and `worker.yaml`
At this point, you can modify the generated configs to your liking.
Optionally, you can specify `--config-patch` with RFC6902 jsonpatch which will be applied during the config generation.

#### Validate the Configuration Files

```bash
talosctl validate --config controlplane.yaml --mode metal
talosctl validate --config join.yaml --mode metal
talosctl validate --config worker.yaml --mode metal
```

> Note: Validation of the install disk could potentially fail as the validation
Expand Down Expand Up @@ -98,7 +98,7 @@ packet device create \
--operating-system "custom_ipxe" \
--plan $PLAN\
--hostname $HOSTNAME\
--userdata-file join.yaml
--userdata-file worker.yaml
```

### Bootstrap Etcd
Expand Down
10 changes: 5 additions & 5 deletions website/content/docs/v0.12/Bare Metal Platforms/matchbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Using the DNS name of the load balancer, generate the base configuration files f
```bash
$ talosctl gen config talos-k8s-metal-tutorial https://<load balancer IP or DNS>:<port>
created controlplane.yaml
created join.yaml
created worker.yaml
created talosconfig
```

Expand All @@ -32,15 +32,15 @@ Optionally, you can specify `--config-patch` with RFC6902 jsonpatch which will b
```bash
$ talosctl validate --config controlplane.yaml --mode metal
controlplane.yaml is valid for metal mode
$ talosctl validate --config join.yaml --mode metal
join.yaml is valid for metal mode
$ talosctl validate --config worker.yaml --mode metal
worker.yaml is valid for metal mode
```

#### Publishing the Machine Configuration Files

In bare-metal setups it is up to the user to provide the configuration files over HTTP(S).
A special kernel parameter (`talos.config`) must be used to inform Talos about _where_ it should retreive its' configuration file.
To keep things simple we will place `controlplane.yaml`, and `join.yaml` into Matchbox's `assets` directory.
To keep things simple we will place `controlplane.yaml`, and `worker.yaml` into Matchbox's `assets` directory.
This directory is automatically served by Matchbox.

### Create the Matchbox Configuration Files
Expand Down Expand Up @@ -94,7 +94,7 @@ Download these files from the [release](https://github.com/talos-systems/talos/r
"console=ttyS0",
"printk.devkmsg=on",
"talos.platform=metal",
"talos.config=http://matchbox.talos.dev/assets/join.yaml"
"talos.config=http://matchbox.talos.dev/assets/worker.yaml"
]
}
}
Expand Down
8 changes: 4 additions & 4 deletions website/content/docs/v0.12/Cloud Platforms/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Using the DNS name of the loadbalancer created earlier, generate the base config
```bash
$ talosctl gen config talos-k8s-aws-tutorial https://<load balancer IP or DNS>:<port> --with-examples=false --with-docs=false
created controlplane.yaml
created join.yaml
created worker.yaml
created talosconfig
```

Expand All @@ -156,8 +156,8 @@ Optionally, you can specify `--config-patch` with RFC6902 jsonpatch which will b
```bash
$ talosctl validate --config controlplane.yaml --mode cloud
controlplane.yaml is valid for cloud mode
$ talosctl validate --config join.yaml --mode cloud
join.yaml is valid for cloud mode
$ talosctl validate --config worker.yaml --mode cloud
worker.yaml is valid for cloud mode
```

### Create the EC2 Instances
Expand Down Expand Up @@ -194,7 +194,7 @@ aws ec2 run-instances \
--image-id $AMI \
--count 3 \
--instance-type t3.small \
--user-data file://join.yaml \
--user-data file://worker.yaml \
--subnet-id $SUBNET \
--security-group-ids $SECURITY_GROUP
--tag-specifications "ResourceType=instance,Tags=[{Key=Name,Value=talos-aws-tutorial-worker}]"
Expand Down
2 changes: 1 addition & 1 deletion website/content/docs/v0.12/Cloud Platforms/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ done
--image talos \
--vnet-name talos-vnet \
--subnet talos-subnet \
--custom-data ./join.yaml \
--custom-data ./worker.yaml \
-g $GROUP \
--admin-username talos \
--generate-ssh-keys \
Expand Down
8 changes: 4 additions & 4 deletions website/content/docs/v0.12/Cloud Platforms/digitalocean.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Using the DNS name of the loadbalancer created earlier, generate the base config
```bash
$ talosctl gen config talos-k8s-digital-ocean-tutorial https://<load balancer IP or DNS>:<port>
created controlplane.yaml
created join.yaml
created worker.yaml
created talosconfig
```

Expand All @@ -69,8 +69,8 @@ Optionally, you can specify `--config-patch` with RFC6902 jsonpatch which will b
```bash
$ talosctl validate --config controlplane.yaml --mode cloud
controlplane.yaml is valid for cloud mode
$ talosctl validate --config join.yaml --mode cloud
join.yaml is valid for cloud mode
$ talosctl validate --config worker.yaml --mode cloud
worker.yaml is valid for cloud mode
```

### Create the Droplets
Expand Down Expand Up @@ -122,7 +122,7 @@ doctl compute droplet create \
--image <image ID> \
--size s-2vcpu-4gb \
--enable-private-networking \
--user-data-file join.yaml \
--user-data-file worker.yaml \
--ssh-keys <ssh key fingerprint> \
talos-worker-1
```
Expand Down
2 changes: 1 addition & 1 deletion website/content/docs/v0.12/Cloud Platforms/gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ gcloud compute instances create talos-worker-0 \
--image talos \
--zone $REGION-b \
--boot-disk-size 20GB \
--metadata-from-file=user-data=./join.yaml
--metadata-from-file=user-data=./worker.yaml
```

### Bootstrap Etcd
Expand Down
2 changes: 1 addition & 1 deletion website/content/docs/v0.12/Cloud Platforms/openstack.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Create worker:

```bash
# Update network name as necessary.
openstack server create talos-worker-1 --flavor m1.small --network shared --image talos --user-data /path/to/join.yaml
openstack server create talos-worker-1 --flavor m1.small --network shared --image talos --user-data /path/to/worker.yaml
```

> Note: This step can be repeated to add more workers.
Expand Down
2 changes: 1 addition & 1 deletion website/content/docs/v0.12/Guides/air-gapped.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ The only required flag for this guide is `--registry-mirror '*'=http://10.5.0.1:
The endpoint being used is `10.5.0.1`, as this is the default bridge interface address which will be routable from the QEMU VMs (`127.0.0.1` IP will be pointing to the VM itself).

```bash
$ sudo -E talosctl cluster create --provisioner=qemu --registry-mirror '*'=http://10.5.0.1:6000 --install-image=ghcr.io/talos-systems/installer:v0.11.0
$ sudo -E talosctl cluster create --provisioner=qemu --registry-mirror '*'=http://10.5.0.1:6000 --install-image=ghcr.io/talos-systems/installer:v0.12.0
validating CIDR and reserving IPs
generating PKI and tokens
creating state directory in "/home/smira/.talos/clusters/talos-default"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The configuration can either be done on a Loadbalancer, or simply trough DNS.

For example:

> This is in the config file for the cluster e.g. controlplane.yaml and join.yaml.
> This is in the config file for the cluster e.g. controlplane.yaml and worker.yaml.
> for more details, please see: [v1alpha1 endpoint configuration](../../reference/configuration/#controlplaneconfig)
```yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ It is also possible to use generated configuration as a reference by pulling gen

```bash
talosctl read -n 10.5.0.2 /system/state/config.yaml > controlplane.yaml
talosctl read -n 10.5.0.3 /system/state/config.yaml > join.yaml
talosctl read -n 10.5.0.3 /system/state/config.yaml > worker.yaml
```

### Manual Configuration
Expand Down
16 changes: 7 additions & 9 deletions website/content/docs/v0.12/Guides/rbac.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,21 @@ There is a set of predefined roles that allow access to different [API methods](
* `os:reader` grants access to "safe" methods (for example, that includes the ability to list files, but does not include the ability to read files content);
* `os:etcd:backup` grants access to [`/machine.MachineService/EtcdSnapshot`](../../reference/api/#machine.EtcdSnapshotRequest) method.

Roles in the current `talosconfig` can be checked with the following command (using [`yq` v4](https://github.com/mikefarah/yq)):
Roles in the current `talosconfig` can be checked with the following command (using `talosctl` v0.12+):

```sh
$ yq eval '.contexts[.context].crt' talosconfig | base64 -d | openssl x509 -noout -text
$ talosctl config info

Certificate:
Data:
[...]
Subject: O = os:reader
[...]
[...]
Roles: os:admin
[...]
```

RBAC is enabled by default in new clusters created with `talosctl` v0.11 and disabled otherwise.
RBAC is enabled by default in new clusters created with `talosctl` v0.11+ and disabled otherwise.

## Enabling RBAC

First, both the Talos cluster and `talosctl` tool should be [upgraded](../upgrading-talos/) to v0.11.
First, both the Talos cluster and `talosctl` tool should be [upgraded](../upgrading-talos/).
Then the `talosctl config new` command should be used to generate a new client configuration with the `os:admin` role.
Additional configurations and certificates for different roles can be generated by passing `--roles` flag:

Expand Down
8 changes: 6 additions & 2 deletions website/content/docs/v0.12/Guides/upgrading-talos.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,22 @@ TBD

TBD

### After Upgrade to 0.12

TBD

## `talosctl` Upgrade

To manually upgrade a Talos node, you will specify the node's IP address and the
installer container image for the version of Talos to which you wish to upgrade.

For instance, if your Talos node has the IP address `10.20.30.40` and you want
to install the official version `v0.11.0`, you would enter a command such
to install the official version `v0.12.0`, you would enter a command such
as:

```sh
$ talosctl upgrade --nodes 10.20.30.40 \
--image ghcr.io/talos-systems/installer:v0.11.0
--image ghcr.io/talos-systems/installer:v0.12.0
```

There is an option to this command: `--preserve`, which can be used to explicitly tell Talos to either keep intact its ephemeral data or not.
Expand Down
22 changes: 11 additions & 11 deletions website/content/docs/v0.12/Introduction/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ The easiest way to install Talos is to use the ISO image.

The latest ISO image can be found on the Github [Releases](https://github.com/talos-systems/talos/releases) page:

- X86: [https://github.com/talos-systems/talos/releases/download/v0.11.0/talos-amd64.iso](https://github.com/talos-systems/talos/releases/download/v0.11.0/talos-amd64.iso)
- ARM64: [https://github.com/talos-systems/talos/releases/download/v0.11.0/talos-arm64.iso](https://github.com/talos-systems/talos/releases/download/v0.11.0/talos-arm64.iso)
- X86: [https://github.com/talos-systems/talos/releases/download/v0.12.0/talos-amd64.iso](https://github.com/talos-systems/talos/releases/download/v0.12.0/talos-amd64.iso)
- ARM64: [https://github.com/talos-systems/talos/releases/download/v0.12.0/talos-arm64.iso](https://github.com/talos-systems/talos/releases/download/v0.12.0/talos-arm64.iso)

For self-built media and network booting, you can use the kernel and initramfs:

- X86: [https://github.com/talos-systems/talos/releases/download/v0.11.0/boot-amd64.tar.gz](https://github.com/talos-systems/talos/releases/download/v0.11.0/boot-amd64.tar.gz)
- ARM64: [https://github.com/talos-systems/talos/releases/download/v0.11.0/boot-ard64.tar.gz](https://github.com/talos-systems/talos/releases/download/v0.11.0/boot-ard64.tar.gz)
- X86: [https://github.com/talos-systems/talos/releases/download/v0.12.0/boot-amd64.tar.gz](https://github.com/talos-systems/talos/releases/download/v0.12.0/boot-amd64.tar.gz)
- ARM64: [https://github.com/talos-systems/talos/releases/download/v0.12.0/boot-ard64.tar.gz](https://github.com/talos-systems/talos/releases/download/v0.12.0/boot-ard64.tar.gz)

When booted from the ISO, Talos will run in RAM, and it will not install itself
until it is provided a configuration.
Expand Down Expand Up @@ -207,7 +207,7 @@ When you run this command, you will receive a number of files in your current
directory:

- `controlplane.yaml`
- `join.yaml`
- `worker.yaml`
- `talosconfig`

The three `.yaml` files are what we call Machine Configs.
Expand All @@ -219,21 +219,21 @@ In the case of the `controlplane.yaml`, it even describes how Talos should form
The `talosconfig` file (which is also YAML) is your local client configuration
file.

### Controlplane, Init, and Join
### Controlplane, Init, and Worker

The three types of Machine Configs correspond to the three roles of Talos nodes.
For our purposes, you can ignore the Init type.
It is a legacy type which will go away eventually.
Its purpose was to self-bootstrap.
Instead, we now use an API call to bootstrap the cluster, which is much more robust.

That leaves us with Controlplane and Join.
That leaves us with Controlplane and Worker.

The Controlplane Machine Config describes the configuration of a Talos server on
which the Kubernetes Controlplane should run.
The Join Machine Config describes everything else: workload servers.
The Worker Machine Config describes everything else: workload servers.

The main difference between Controlplane Machine Config files and Join Machine
The main difference between Controlplane Machine Config files and Worker Machine
Config files is that the former contains information about how to form the
Kubernetes cluster.

Expand All @@ -243,7 +243,7 @@ The generated files can be thought of as templates.
Individual machines may need specific settings (for instance, each may have a
different static IP address).
When different files are needed for machines of the same type, simply
copy the source template (`controlplane.yaml` or `join.yaml`) and make whatever
copy the source template (`controlplane.yaml` or `worker.yaml`) and make whatever
modifications need to be done.

For instance, if you had three controlplane nodes and three worker nodes, you
Expand All @@ -254,7 +254,7 @@ may do something like this:
cp controlplane.yaml cp$i.yaml
end
for i in $(seq 0 2); do
cp join.yaml w$i.yaml
cp worker.yaml w$i.yaml
end
```
Expand Down
4 changes: 2 additions & 2 deletions website/content/docs/v0.12/Introduction/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Verify that you can reach Kubernetes:
```bash
$ kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
talos-default-master-1 Ready master 115s v1.20.2 10.5.0.2 <none> Talos (v0.11.0) <host kernel> containerd://1.4.3
talos-default-worker-1 Ready <none> 115s v1.20.2 10.5.0.3 <none> Talos (v0.11.0) <host kernel> containerd://1.4.3
talos-default-master-1 Ready master 115s v1.20.2 10.5.0.2 <none> Talos (v0.12.0) <host kernel> containerd://1.4.3
talos-default-worker-1 Ready <none> 115s v1.20.2 10.5.0.3 <none> Talos (v0.12.0) <host kernel> containerd://1.4.3
```

## Destroy the Cluster
Expand Down
6 changes: 3 additions & 3 deletions website/content/docs/v0.12/Local Platforms/firecracker.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ You can download `talosctl` and all required binaries via
curl https://github.com/talos-systems/talos/releases/download/<version>/talosctl-<platform>-<arch> -L -o talosctl
```

For example version `v0.11.0` for `linux` platform:
For example version `v0.12.0` for `linux` platform:

```bash
curl https://github.com/talos-systems/talos/releases/latest/download/talosctl-linux-amd64 -L -o talosctl
Expand Down Expand Up @@ -100,7 +100,7 @@ curl https://github.com/talos-systems/talos/releases/download/<version>/vmlinuz
curl https://github.com/talos-systems/talos/releases/download/<version>/initramfs.xz -L -o _out/initramfs.xz
```

For example version `v0.11.0`:
For example version `v0.12.0`:

```bash
curl https://github.com/talos-systems/talos/releases/latest/download/vmlinuz -L -o _out/vmlinuz
Expand Down Expand Up @@ -148,7 +148,7 @@ NAME TYPE IP CPU RAM DISK
talos-default-master-1 Init 10.5.0.2 1.00 1.6 GB 4.3 GB
talos-default-master-2 ControlPlane 10.5.0.3 1.00 1.6 GB 4.3 GB
talos-default-master-3 ControlPlane 10.5.0.4 1.00 1.6 GB 4.3 GB
talos-default-worker-1 Join 10.5.0.5 1.00 1.6 GB 4.3 GB
talos-default-worker-1 Worker 10.5.0.5 1.00 1.6 GB 4.3 GB
```

## Cleaning Up
Expand Down
10 changes: 5 additions & 5 deletions website/content/docs/v0.12/Local Platforms/qemu.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ You can download `talosctl` and all required binaries via
curl https://github.com/talos-systems/talos/releases/download/<version>/talosctl-<platform>-<arch> -L -o talosctl
```

For example version `v0.11.0` for `linux` platform:
For example version `v0.12.0` for `linux` platform:

```bash
curl https://github.com/talos-systems/talos/releases/latest/download/talosctl-linux-amd64 -L -o talosctl
Expand All @@ -65,11 +65,11 @@ curl https://github.com/talos-systems/talos/releases/download/<version>/vmlinuz-
curl https://github.com/talos-systems/talos/releases/download/<version>/initramfs-<arch>.xz -L -o _out/initramfs-<arch>.xz
```

For example version `v0.11.0`:
For example version `v0.12.0`:

```bash
curl https://github.com/talos-systems/talos/releases/download/v0.11.0/vmlinuz-amd64 -L -o _out/vmlinuz-amd64
curl https://github.com/talos-systems/talos/releases/download/v0.11.0/initramfs-amd64.xz -L -o _out/initramfs-amd64.xz
curl https://github.com/talos-systems/talos/releases/download/v0.12.0/vmlinuz-amd64 -L -o _out/vmlinuz-amd64
curl https://github.com/talos-systems/talos/releases/download/v0.12.0/initramfs-amd64.xz -L -o _out/initramfs-amd64.xz
```

## Create the Cluster
Expand Down Expand Up @@ -120,7 +120,7 @@ NAME TYPE IP CPU RAM DISK
talos-default-master-1 Init 10.5.0.2 1.00 1.6 GB 4.3 GB
talos-default-master-2 ControlPlane 10.5.0.3 1.00 1.6 GB 4.3 GB
talos-default-master-3 ControlPlane 10.5.0.4 1.00 1.6 GB 4.3 GB
talos-default-worker-1 Join 10.5.0.5 1.00 1.6 GB 4.3 GB
talos-default-worker-1 Worker 10.5.0.5 1.00 1.6 GB 4.3 GB
```

## Cleaning Up
Expand Down
Loading

0 comments on commit 679b08f

Please sign in to comment.