From 2ba8ac9ab4b24572512c2a877acd26b912b5423a Mon Sep 17 00:00:00 2001 From: Alexey Palazhchenko Date: Wed, 7 Jul 2021 13:21:31 +0000 Subject: [PATCH] docs: add documentation directory for 0.12 Plus, convert a few absolute URLs with a version number to relative URLs without versions. Signed-off-by: Alexey Palazhchenko --- .conform.yaml | 2 +- Dockerfile | 6 +- .../Bare Metal Platforms/digital-rebar.md | 172 + .../Bare Metal Platforms/equinix-metal.md | 125 + .../v0.12/Bare Metal Platforms/matchbox.md | 174 + .../docs/v0.12/Bare Metal Platforms/sidero.md | 7 + .../content/docs/v0.12/Cloud Platforms/aws.md | 256 + .../docs/v0.12/Cloud Platforms/azure.md | 284 + .../v0.12/Cloud Platforms/digitalocean.md | 157 + .../content/docs/v0.12/Cloud Platforms/gcp.md | 185 + .../docs/v0.12/Cloud Platforms/openstack.md | 146 + .../docs/v0.12/Guides/advanced-networking.md | 84 + .../content/docs/v0.12/Guides/air-gapped.md | 137 + .../configuring-certificate-authorities.md | 21 + .../v0.12/Guides/configuring-containerd.md | 33 + .../Guides/configuring-corporate-proxies.md | 52 + .../configuring-network-connectivity.md | 71 + .../Guides/configuring-pull-through-cache.md | 110 + .../configuring-the-cluster-endpoint.md | 45 + .../Guides/configuring-wireguard-network.md | 101 + .../v0.12/Guides/converting-control-plane.md | 257 + .../v0.12/Guides/customizing-the-kernel.md | 49 + .../Guides/customizing-the-root-filesystem.md | 61 + .../v0.12/Guides/deploy-metrics-server.md | 43 + .../docs/v0.12/Guides/disaster-recovery.md | 147 + .../docs/v0.12/Guides/disk-encryption.md | 179 + .../Guides/editing-machine-configuration.md | 104 + .../content/docs/v0.12/Guides/managing-pki.md | 49 + website/content/docs/v0.12/Guides/rbac.md | 50 + .../docs/v0.12/Guides/resetting-a-machine.md | 22 + website/content/docs/v0.12/Guides/storage.md | 220 + .../Guides/troubleshooting-control-plane.md | 437 ++ .../docs/v0.12/Guides/upgrading-kubernetes.md | 281 + .../docs/v0.12/Guides/upgrading-talos.md | 67 + website/content/docs/v0.12/Guides/vip.md | 81 + .../v0.12/Introduction/getting-started.md | 460 ++ .../docs/v0.12/Introduction/quickstart.md | 46 + .../v0.12/Introduction/system-requirements.md | 54 + .../docs/v0.12/Introduction/what-is-new.md | 55 + .../docs/v0.12/Introduction/what-is-talos.md | 27 + .../docs/v0.12/Learn More/architecture.md | 41 + .../docs/v0.12/Learn More/components.md | 123 + .../content/docs/v0.12/Learn More/concepts.md | 12 + .../docs/v0.12/Learn More/control-plane.md | 67 + .../v0.12/Learn More/controllers-resources.md | 229 + website/content/docs/v0.12/Learn More/faqs.md | 31 + .../v0.12/Learn More/networking-resources.md | 394 ++ .../docs/v0.12/Learn More/philosophy.md | 72 + .../content/docs/v0.12/Learn More/talosctl.md | 62 + .../content/docs/v0.12/Learn More/upgrades.md | 111 + .../docs/v0.12/Local Platforms/docker.md | 60 + .../docs/v0.12/Local Platforms/firecracker.md | 316 + .../docs/v0.12/Local Platforms/qemu.md | 299 + .../docs/v0.12/Local Platforms/virtualbox.md | 190 + website/content/docs/v0.12/Reference/api.md | 3475 +++++++++++ website/content/docs/v0.12/Reference/cli.md | 2216 +++++++ .../docs/v0.12/Reference/configuration.md | 5140 +++++++++++++++++ .../content/docs/v0.12/Reference/kernel.md | 107 + .../content/docs/v0.12/Reference/platform.md | 9 + .../Single Board Computers/bananapi_m64.md | 57 + .../libretech_all_h3_cc_h5.md | 57 + .../v0.12/Single Board Computers/pine64.md | 57 + .../v0.12/Single Board Computers/rock64.md | 57 + .../v0.12/Single Board Computers/rockpi_4.md | 93 + .../v0.12/Single Board Computers/rpi_4.md | 109 + .../v0.12/Virtualized Platforms/hyper-v.md | 5 + .../docs/v0.12/Virtualized Platforms/kvm.md | 5 + .../v0.12/Virtualized Platforms/proxmox.md | 218 + .../v0.12/Virtualized Platforms/vmware.md | 214 + .../docs/v0.12/Virtualized Platforms/xen.md | 5 + website/content/docs/v0.12/index.md | 37 + website/gridsome.config.js | 17 + website/src/pages/Index.vue | 2 +- website/static/_redirects | 11 +- 74 files changed, 18745 insertions(+), 10 deletions(-) create mode 100644 website/content/docs/v0.12/Bare Metal Platforms/digital-rebar.md create mode 100644 website/content/docs/v0.12/Bare Metal Platforms/equinix-metal.md create mode 100644 website/content/docs/v0.12/Bare Metal Platforms/matchbox.md create mode 100644 website/content/docs/v0.12/Bare Metal Platforms/sidero.md create mode 100644 website/content/docs/v0.12/Cloud Platforms/aws.md create mode 100644 website/content/docs/v0.12/Cloud Platforms/azure.md create mode 100644 website/content/docs/v0.12/Cloud Platforms/digitalocean.md create mode 100644 website/content/docs/v0.12/Cloud Platforms/gcp.md create mode 100644 website/content/docs/v0.12/Cloud Platforms/openstack.md create mode 100644 website/content/docs/v0.12/Guides/advanced-networking.md create mode 100644 website/content/docs/v0.12/Guides/air-gapped.md create mode 100644 website/content/docs/v0.12/Guides/configuring-certificate-authorities.md create mode 100644 website/content/docs/v0.12/Guides/configuring-containerd.md create mode 100644 website/content/docs/v0.12/Guides/configuring-corporate-proxies.md create mode 100644 website/content/docs/v0.12/Guides/configuring-network-connectivity.md create mode 100644 website/content/docs/v0.12/Guides/configuring-pull-through-cache.md create mode 100644 website/content/docs/v0.12/Guides/configuring-the-cluster-endpoint.md create mode 100644 website/content/docs/v0.12/Guides/configuring-wireguard-network.md create mode 100644 website/content/docs/v0.12/Guides/converting-control-plane.md create mode 100644 website/content/docs/v0.12/Guides/customizing-the-kernel.md create mode 100644 website/content/docs/v0.12/Guides/customizing-the-root-filesystem.md create mode 100644 website/content/docs/v0.12/Guides/deploy-metrics-server.md create mode 100644 website/content/docs/v0.12/Guides/disaster-recovery.md create mode 100644 website/content/docs/v0.12/Guides/disk-encryption.md create mode 100644 website/content/docs/v0.12/Guides/editing-machine-configuration.md create mode 100644 website/content/docs/v0.12/Guides/managing-pki.md create mode 100644 website/content/docs/v0.12/Guides/rbac.md create mode 100644 website/content/docs/v0.12/Guides/resetting-a-machine.md create mode 100644 website/content/docs/v0.12/Guides/storage.md create mode 100644 website/content/docs/v0.12/Guides/troubleshooting-control-plane.md create mode 100644 website/content/docs/v0.12/Guides/upgrading-kubernetes.md create mode 100644 website/content/docs/v0.12/Guides/upgrading-talos.md create mode 100644 website/content/docs/v0.12/Guides/vip.md create mode 100644 website/content/docs/v0.12/Introduction/getting-started.md create mode 100644 website/content/docs/v0.12/Introduction/quickstart.md create mode 100644 website/content/docs/v0.12/Introduction/system-requirements.md create mode 100644 website/content/docs/v0.12/Introduction/what-is-new.md create mode 100644 website/content/docs/v0.12/Introduction/what-is-talos.md create mode 100644 website/content/docs/v0.12/Learn More/architecture.md create mode 100644 website/content/docs/v0.12/Learn More/components.md create mode 100644 website/content/docs/v0.12/Learn More/concepts.md create mode 100644 website/content/docs/v0.12/Learn More/control-plane.md create mode 100644 website/content/docs/v0.12/Learn More/controllers-resources.md create mode 100644 website/content/docs/v0.12/Learn More/faqs.md create mode 100644 website/content/docs/v0.12/Learn More/networking-resources.md create mode 100644 website/content/docs/v0.12/Learn More/philosophy.md create mode 100644 website/content/docs/v0.12/Learn More/talosctl.md create mode 100644 website/content/docs/v0.12/Learn More/upgrades.md create mode 100644 website/content/docs/v0.12/Local Platforms/docker.md create mode 100644 website/content/docs/v0.12/Local Platforms/firecracker.md create mode 100644 website/content/docs/v0.12/Local Platforms/qemu.md create mode 100644 website/content/docs/v0.12/Local Platforms/virtualbox.md create mode 100644 website/content/docs/v0.12/Reference/api.md create mode 100644 website/content/docs/v0.12/Reference/cli.md create mode 100644 website/content/docs/v0.12/Reference/configuration.md create mode 100644 website/content/docs/v0.12/Reference/kernel.md create mode 100644 website/content/docs/v0.12/Reference/platform.md create mode 100644 website/content/docs/v0.12/Single Board Computers/bananapi_m64.md create mode 100644 website/content/docs/v0.12/Single Board Computers/libretech_all_h3_cc_h5.md create mode 100644 website/content/docs/v0.12/Single Board Computers/pine64.md create mode 100644 website/content/docs/v0.12/Single Board Computers/rock64.md create mode 100644 website/content/docs/v0.12/Single Board Computers/rockpi_4.md create mode 100644 website/content/docs/v0.12/Single Board Computers/rpi_4.md create mode 100644 website/content/docs/v0.12/Virtualized Platforms/hyper-v.md create mode 100644 website/content/docs/v0.12/Virtualized Platforms/kvm.md create mode 100644 website/content/docs/v0.12/Virtualized Platforms/proxmox.md create mode 100644 website/content/docs/v0.12/Virtualized Platforms/vmware.md create mode 100644 website/content/docs/v0.12/Virtualized Platforms/xen.md create mode 100644 website/content/docs/v0.12/index.md diff --git a/.conform.yaml b/.conform.yaml index 0ffc3c2877..add7a7f7de 100644 --- a/.conform.yaml +++ b/.conform.yaml @@ -31,7 +31,7 @@ policies: - talosctl - kernel - security - - ^v0.11 + - ^v0.12 - type: license spec: skipPaths: diff --git a/Dockerfile b/Dockerfile index 5c517ad027..e1256e613e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -674,9 +674,9 @@ RUN protoc \ /protos/time/*.proto FROM scratch AS docs -COPY --from=docs-build /tmp/configuration.md /website/content/docs/v0.11/Reference/ -COPY --from=docs-build /tmp/cli.md /website/content/docs/v0.11/Reference/ -COPY --from=proto-docs-build /tmp/api.md /website/content/docs/v0.11/Reference/ +COPY --from=docs-build /tmp/configuration.md /website/content/docs/v0.12/Reference/ +COPY --from=docs-build /tmp/cli.md /website/content/docs/v0.12/Reference/ +COPY --from=proto-docs-build /tmp/api.md /website/content/docs/v0.12/Reference/ # The talosctl-cni-bundle builds the CNI bundle for talosctl. diff --git a/website/content/docs/v0.12/Bare Metal Platforms/digital-rebar.md b/website/content/docs/v0.12/Bare Metal Platforms/digital-rebar.md new file mode 100644 index 0000000000..321d5b0bea --- /dev/null +++ b/website/content/docs/v0.12/Bare Metal Platforms/digital-rebar.md @@ -0,0 +1,172 @@ +--- +title: "Digital Rebar" +description: "In this guide we will create an Kubernetes cluster with 1 worker node, and 2 controlplane nodes using an existing digital rebar deployment." +--- + +## Prerequisites + +- 3 nodes (please see [hardware requirements](../../guides/getting-started#system-requirements)) +- Loadbalancer +- Digital Rebar Server +- Talosctl access (see [talosctl setup](../../guides/getting-started/talosctl)) + +## Creating a Cluster + +In this guide we will create an Kubernetes cluster with 1 worker node, and 2 controlplane nodes. +We assume an existing digital rebar deployment, and some familiarity with iPXE. + +We leave it up to the user to decide if they would like to use static networking, or DHCP. +The setup and configuration of DHCP will not be covered. + +### Create the Machine Configuration Files + +#### Generating Base Configurations + +Using the DNS name of the load balancer, generate the base configuration files for the Talos machines: + +```bash +$ talosctl gen config talos-k8s-metal-tutorial https://: +created controlplane.yaml +created join.yaml +created talosconfig +``` + +> The loadbalancer is used to distribute the load across multiple controlplane nodes. +> This isn't covered in detail, because we asume some loadbalancing knowledge before hand. +> If you think this should be added to the docs, please [create a issue](https://github.com/talos-systems/talos/issues). + +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 +controlplane.yaml is valid for metal mode +$ talosctl validate --config join.yaml --mode metal +join.yaml is valid for metal mode +``` + +#### Publishing the Machine Configuration Files + +Digital Rebar has a build-in fileserver, which means we can use this feature to expose the talos configuration files. +We will place `controlplane.yaml`, and `worker.yaml` into Digital Rebar file server by using the `drpcli` tools. + +Copy the generated files from the step above into your Digital Rebar installation. + +```bash +drpcli file upload .yaml as .yaml +``` + +Replacing `` with controlplane or worker. + +### Download the boot files + +Download a recent version of `boot.tar.gz` from [github.](https://github.com/talos-systems/talos/releases/) + +Upload to DRB: + +```bash +$ drpcli isos upload boot.tar.gz as talos.tar.gz +{ + "Path": "talos.tar.gz", + "Size": 96470072 +} +``` + +We have some Digital Rebar [example files](https://github.com/talos-systems/talos/tree/master/hack/test/digitalrebar/) in the Git repo you can use to provision Digital Rebar with drpcli. + +To apply these configs you need to create them, and then apply them as follow: + +```bash +$ drpcli bootenvs create talos +{ + "Available": true, + "BootParams": "", + "Bundle": "", + "Description": "", + "Documentation": "", + "Endpoint": "", + "Errors": [], + "Initrds": [], + "Kernel": "", + "Meta": {}, + "Name": "talos", + "OS": { + "Codename": "", + "Family": "", + "IsoFile": "", + "IsoSha256": "", + "IsoUrl": "", + "Name": "", + "SupportedArchitectures": {}, + "Version": "" + }, + "OnlyUnknown": false, + "OptionalParams": [], + "ReadOnly": false, + "RequiredParams": [], + "Templates": [], + "Validated": true +} +``` + +```bash +drpcli bootenvs update talos - < bootenv.yaml +``` + +> You need to do this for all files in the example directory. +> If you don't have access to the `drpcli` tools you can also use the webinterface. + +It's important to have a corresponding SHA256 hash matching the boot.tar.gz + +#### Bootenv BootParams + +We're using some of Digital Rebar build in templating to make sure the machine gets the correct role assigned. + +`talos.platform=metal talos.config={{ .ProvisionerURL }}/files/{{.Param \"talos/role\"}}.yaml"` + +This is why we also include a `params.yaml` in the example directory to make sure the role is set to one of the following: + +- controlplane +- worker + +The `{{.Param \"talos/role\"}}` then gets populated with one of the above roles. + +### Boot the Machines + +In the UI of Digital Rebar you need to select the machines you want te provision. +Once selected, you need to assign to following: + +- Profile +- Workflow + +This will provision the Stage and Bootenv with the talos values. +Once this is done, you can boot the machine. + +To understand the boot process, we have a higher level overview located at [metal overview](../overview). + +### Bootstrap Etcd + +To configure `talosctl` we will need the first control plane node's IP: + +Set the `endpoints` and `nodes`: + +```bash +talosctl --talosconfig talosconfig config endpoint +talosctl --talosconfig talosconfig config node +``` + +Bootstrap `etcd`: + +```bash +talosctl --talosconfig talosconfig bootstrap +``` + +### Retrieve the `kubeconfig` + +At this point we can retrieve the admin `kubeconfig` by running: + +```bash +talosctl --talosconfig talosconfig kubeconfig . +``` diff --git a/website/content/docs/v0.12/Bare Metal Platforms/equinix-metal.md b/website/content/docs/v0.12/Bare Metal Platforms/equinix-metal.md new file mode 100644 index 0000000000..004614dbc7 --- /dev/null +++ b/website/content/docs/v0.12/Bare Metal Platforms/equinix-metal.md @@ -0,0 +1,125 @@ +--- +title: "Equinix Metal" +description: "Creating Talos cluster using Enquinix Metal." +--- + +## Prerequisites + +This guide assumes the user has a working API token, the Equinix Metal CLI installed, and some familiarity with the CLI. + +## Network Booting + +To install Talos to a server a working TFTP and iPXE server are needed. +How this is done varies and is left as an exercise for the user. +In general this requires a Talos kernel vmlinuz and initramfs. +These assets can be downloaded from a given [release](https://github.com/talos-systems/talos/releases). + +## Special Considerations + +### PXE Boot Kernel Parameters + +The following is a list of kernel parameters required by Talos: + +- `talos.platform`: set this to `packet` +- `init_on_alloc=1`: required by KSPP +- `slab_nomerge`: required by KSPP +- `pti=on`: required by KSPP + +### User Data + + + +To configure a Talos you can use the metadata service provide by Equinix Metal. +It is required to add a shebang to the top of the configuration file. +The shebang is arbitrary in the case of Talos, and the convention we use is `#!talos`. + + + +## Creating a Cluster via the Equinix Metal CLI + +### Control Plane Endpoint + +The strategy used for an HA cluster varies and is left as an exercise for the user. +Some of the known ways are: + +- DNS +- Load Balancer +- BPG + +### Create the Machine Configuration Files + +#### Generating Base Configurations + +Using the DNS name of the loadbalancer created earlier, generate the base configuration files for the Talos machines: + +```bash +$ talosctl gen config talos-k8s-aws-tutorial https://: +created controlplane.yaml +created join.yaml +created talosconfig +``` + +Now add the required shebang (e.g. `#!talos`) at the top of `controlplane.yaml`, and `join.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 +``` + +> Note: Validation of the install disk could potentially fail as the validation +> is performed on you local machine and the specified disk may not exist. + +#### Create the Control Plane Nodes + +```bash +packet device create \ + --project-id $PROJECT_ID \ + --facility $FACILITY \ + --ipxe-script-url $PXE_SERVER \ + --operating-system "custom_ipxe" \ + --plan $PLAN\ + --hostname $HOSTNAME\ + --userdata-file controlplane.yaml +``` + +> Note: The above should be invoked at least twice in order for `etcd` to form quorum. + +#### Create the Worker Nodes + +```bash +packet device create \ + --project-id $PROJECT_ID \ + --facility $FACILITY \ + --ipxe-script-url $PXE_SERVER \ + --operating-system "custom_ipxe" \ + --plan $PLAN\ + --hostname $HOSTNAME\ + --userdata-file join.yaml +``` + +### Bootstrap Etcd + +Set the `endpoints` and `nodes`: + +```bash +talosctl --talosconfig talosconfig config endpoint +talosctl --talosconfig talosconfig config node +``` + +Bootstrap `etcd`: + +```bash +talosctl --talosconfig talosconfig bootstrap +``` + +### Retrieve the `kubeconfig` + +At this point we can retrieve the admin `kubeconfig` by running: + +```bash +talosctl --talosconfig talosconfig kubeconfig . +``` diff --git a/website/content/docs/v0.12/Bare Metal Platforms/matchbox.md b/website/content/docs/v0.12/Bare Metal Platforms/matchbox.md new file mode 100644 index 0000000000..4dc8c8de20 --- /dev/null +++ b/website/content/docs/v0.12/Bare Metal Platforms/matchbox.md @@ -0,0 +1,174 @@ +--- +title: "Matchbox" +description: "In this guide we will create an HA Kubernetes cluster with 3 worker nodes using an existing load balancer and matchbox deployment." +--- + +## Creating a Cluster + +In this guide we will create an HA Kubernetes cluster with 3 worker nodes. +We assume an existing load balancer, matchbox deployment, and some familiarity with iPXE. + +We leave it up to the user to decide if they would like to use static networking, or DHCP. +The setup and configuration of DHCP will not be covered. + +### Create the Machine Configuration Files + +#### Generating Base Configurations + +Using the DNS name of the load balancer, generate the base configuration files for the Talos machines: + +```bash +$ talosctl gen config talos-k8s-metal-tutorial https://: +created controlplane.yaml +created join.yaml +created talosconfig +``` + +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 +controlplane.yaml is valid for metal mode +$ talosctl validate --config join.yaml --mode metal +join.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. +This directory is automatically served by Matchbox. + +### Create the Matchbox Configuration Files + +The profiles we will create will reference `vmlinuz`, and `initramfs.xz`. +Download these files from the [release](https://github.com/talos-systems/talos/releases) of your choice, and place them in `/var/lib/matchbox/assets`. + +#### Profiles + +##### Control Plane Nodes + +```json +{ + "id": "control-plane", + "name": "control-plane", + "boot": { + "kernel": "/assets/vmlinuz", + "initrd": ["/assets/initramfs.xz"], + "args": [ + "initrd=initramfs.xz", + "init_on_alloc=1", + "slab_nomerge", + "pti=on", + "console=tty0", + "console=ttyS0", + "printk.devkmsg=on", + "talos.platform=metal", + "talos.config=http://matchbox.talos.dev/assets/controlplane.yaml" + ] + } +} +``` + +> Note: Be sure to change `http://matchbox.talos.dev` to the endpoint of your matchbox server. + +##### Worker Nodes + +```json +{ + "id": "default", + "name": "default", + "boot": { + "kernel": "/assets/vmlinuz", + "initrd": ["/assets/initramfs.xz"], + "args": [ + "initrd=initramfs.xz", + "init_on_alloc=1", + "slab_nomerge", + "pti=on", + "console=tty0", + "console=ttyS0", + "printk.devkmsg=on", + "talos.platform=metal", + "talos.config=http://matchbox.talos.dev/assets/join.yaml" + ] + } +} +``` + +#### Groups + +Now, create the following groups, and ensure that the `selector`s are accurate for your specific setup. + +```json +{ + "id": "control-plane-1", + "name": "control-plane-1", + "profile": "control-plane", + "selector": { + ... + } +} +``` + +```json +{ + "id": "control-plane-2", + "name": "control-plane-2", + "profile": "control-plane", + "selector": { + ... + } +} +``` + +```json +{ + "id": "control-plane-3", + "name": "control-plane-3", + "profile": "control-plane", + "selector": { + ... + } +} +``` + +```json +{ + "id": "default", + "name": "default", + "profile": "default" +} +``` + +### Boot the Machines + +Now that we have our configuraton files in place, boot all the machines. +Talos will come up on each machine, grab its' configuration file, and bootstrap itself. + +### Bootstrap Etcd + +Set the `endpoints` and `nodes`: + +```bash +talosctl --talosconfig talosconfig config endpoint +talosctl --talosconfig talosconfig config node +``` + +Bootstrap `etcd`: + +```bash +talosctl --talosconfig talosconfig bootstrap +``` + +### Retrieve the `kubeconfig` + +At this point we can retrieve the admin `kubeconfig` by running: + +```bash +talosctl --talosconfig talosconfig kubeconfig . +``` diff --git a/website/content/docs/v0.12/Bare Metal Platforms/sidero.md b/website/content/docs/v0.12/Bare Metal Platforms/sidero.md new file mode 100644 index 0000000000..bff69c31f3 --- /dev/null +++ b/website/content/docs/v0.12/Bare Metal Platforms/sidero.md @@ -0,0 +1,7 @@ +--- +title: "Sidero" +description: "Sidero is a project created by the Talos team that has native support for Talos." +--- + +Sidero is a project created by the Talos team that has native support for Talos. +The best way to get started with Sidero is to visit the [website](https://www.sidero.dev/). diff --git a/website/content/docs/v0.12/Cloud Platforms/aws.md b/website/content/docs/v0.12/Cloud Platforms/aws.md new file mode 100644 index 0000000000..ce1391263b --- /dev/null +++ b/website/content/docs/v0.12/Cloud Platforms/aws.md @@ -0,0 +1,256 @@ +--- +title: "AWS" +description: "Creating a cluster via the AWS CLI." +--- + +## Creating a Cluster via the AWS CLI + +In this guide we will create an HA Kubernetes cluster with 3 worker nodes. +We assume an existing VPC, and some familiarity with AWS. +If you need more information on AWS specifics, please see the [official AWS documentation](https://docs.aws.amazon.com). + +### Create the Subnet + +```bash +aws ec2 create-subnet \ + --region $REGION \ + --vpc-id $VPC \ + --cidr-block ${CIDR_BLOCK} +``` + +### Create the AMI + +#### Prepare the Import Prerequisites + +##### Create the S3 Bucket + +```bash +aws s3api create-bucket \ + --bucket $BUCKET \ + --create-bucket-configuration LocationConstraint=$REGION \ + --acl private +``` + +##### Create the `vmimport` Role + +In order to create an AMI, ensure that the `vmimport` role exists as described in the [official AWS documentation](https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-role). + +Note that the role should be associated with the S3 bucket we created above. + +##### Create the Image Snapshot + +First, download the AWS image from a Talos release: + +```bash +curl -LO https://github.com/talos-systems/talos/releases/latest/download/aws-amd64.tar.gz | tar -xv +``` + +Copy the RAW disk to S3 and import it as a snapshot: + +```bash +aws s3 cp disk.raw s3://$BUCKET/talos-aws-tutorial.raw +aws ec2 import-snapshot \ + --region $REGION \ + --description "Talos kubernetes tutorial" \ + --disk-container "Format=raw,UserBucket={S3Bucket=$BUCKET,S3Key=talos-aws-tutorial.raw}" +``` + +Save the `SnapshotId`, as we will need it once the import is done. +To check on the status of the import, run: + +```bash +aws ec2 describe-import-snapshot-tasks \ + --region $REGION \ + --import-task-ids +``` + +Once the `SnapshotTaskDetail.Status` indicates `completed`, we can register the image. + +##### Register the Image + +```bash +aws ec2 register-image \ + --region $REGION \ + --block-device-mappings "DeviceName=/dev/xvda,VirtualName=talos,Ebs={DeleteOnTermination=true,SnapshotId=$SNAPSHOT,VolumeSize=4,VolumeType=gp2}" \ + --root-device-name /dev/xvda \ + --virtualization-type hvm \ + --architecture x86_64 \ + --ena-support \ + --name talos-aws-tutorial-ami +``` + +We now have an AMI we can use to create our cluster. +Save the AMI ID, as we will need it when we create EC2 instances. + +### Create a Security Group + +```bash +aws ec2 create-security-group \ + --region $REGION \ + --group-name talos-aws-tutorial-sg \ + --description "Security Group for EC2 instances to allow ports required by Talos" +``` + +Using the security group ID from above, allow all internal traffic within the same security group: + +```bash +aws ec2 authorize-security-group-ingress \ + --region $REGION \ + --group-name talos-aws-tutorial-sg \ + --protocol all \ + --port 0 \ + --source-group $SECURITY_GROUP +``` + +and expose the Talos and Kubernetes APIs: + +```bash +aws ec2 authorize-security-group-ingress \ + --region $REGION \ + --group-name talos-aws-tutorial-sg \ + --protocol tcp \ + --port 6443 \ + --cidr 0.0.0.0/0 + +aws ec2 authorize-security-group-ingress \ + --region $REGION \ + --group-name talos-aws-tutorial-sg \ + --protocol tcp \ + --port 50000-50001 \ + --cidr 0.0.0.0/0 +``` + +### Create a Load Balancer + +```bash +aws elbv2 create-load-balancer \ + --region $REGION \ + --name talos-aws-tutorial-lb \ + --type network --subnets $SUBNET +``` + +Take note of the DNS name and ARN. +We will need these soon. + +### Create the Machine Configuration Files + +#### Generating Base Configurations + +Using the DNS name of the loadbalancer created earlier, generate the base configuration files for the Talos machines: + +```bash +$ talosctl gen config talos-k8s-aws-tutorial https://: --with-examples=false --with-docs=false +created controlplane.yaml +created join.yaml +created talosconfig +``` + +Take note that the generated configs are too long for AWS userdata field if the `--with-examples` and `--with-docs` flags are not passed. + +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 cloud +controlplane.yaml is valid for cloud mode +$ talosctl validate --config join.yaml --mode cloud +join.yaml is valid for cloud mode +``` + +### Create the EC2 Instances + +> Note: There is a known issue that prevents Talos from running on T2 instance types. +> Please use T3 if you need burstable instance types. + +#### Create the Control Plane Nodes + +```bash +CP_COUNT=1 +while [[ "$CP_COUNT" -lt 4 ]]; do + aws ec2 run-instances \ + --region $REGION \ + --image-id $AMI \ + --count 1 \ + --instance-type t3.small \ + --user-data file://controlplane.yaml \ + --subnet-id $SUBNET \ + --security-group-ids $SECURITY_GROUP \ + --associate-public-ip-address \ + --tag-specifications "ResourceType=instance,Tags=[{Key=Name,Value=talos-aws-tutorial-cp-$CP_COUNT}]" + ((CP_COUNT++)) +done +``` + +> Make a note of the resulting `PrivateIpAddress` from the init and controlplane nodes for later use. + +#### Create the Worker Nodes + +```bash +aws ec2 run-instances \ + --region $REGION \ + --image-id $AMI \ + --count 3 \ + --instance-type t3.small \ + --user-data file://join.yaml \ + --subnet-id $SUBNET \ + --security-group-ids $SECURITY_GROUP + --tag-specifications "ResourceType=instance,Tags=[{Key=Name,Value=talos-aws-tutorial-worker}]" +``` + +### Configure the Load Balancer + +```bash +aws elbv2 create-target-group \ + --region $REGION \ + --name talos-aws-tutorial-tg \ + --protocol TCP \ + --port 6443 \ + --target-type ip \ + --vpc-id $VPC +``` + +Now, using the target group's ARN, and the **PrivateIpAddress** from the instances that you created : + +```bash +aws elbv2 register-targets \ + --region $REGION \ + --target-group-arn $TARGET_GROUP_ARN \ + --targets Id=$CP_NODE_1_IP Id=$CP_NODE_2_IP Id=$CP_NODE_3_IP +``` + +Using the ARNs of the load balancer and target group from previous steps, create the listener: + +```bash +aws elbv2 create-listener \ + --region $REGION \ + --load-balancer-arn $LOAD_BALANCER_ARN \ + --protocol TCP \ + --port 443 \ + --default-actions Type=forward,TargetGroupArn=$TARGET_GROUP_ARN +``` + +### Bootstrap Etcd + +Set the `endpoints` and `nodes`: + +```bash +talosctl --talosconfig talosconfig config endpoint +talosctl --talosconfig talosconfig config node +``` + +Bootstrap `etcd`: + +```bash +talosctl --talosconfig talosconfig bootstrap +``` + +### Retrieve the `kubeconfig` + +At this point we can retrieve the admin `kubeconfig` by running: + +```bash +talosctl --talosconfig talosconfig kubeconfig . +``` diff --git a/website/content/docs/v0.12/Cloud Platforms/azure.md b/website/content/docs/v0.12/Cloud Platforms/azure.md new file mode 100644 index 0000000000..d1108d3a6a --- /dev/null +++ b/website/content/docs/v0.12/Cloud Platforms/azure.md @@ -0,0 +1,284 @@ +--- +title: "Azure" +description: "Creating a cluster via the CLI on Azure." +--- + +## Creating a Cluster via the CLI + +In this guide we will create an HA Kubernetes cluster with 1 worker node. +We assume existing [Blob Storage](https://docs.microsoft.com/en-us/azure/storage/blobs/), and some familiarity with Azure. +If you need more information on Azure specifics, please see the [official Azure documentation](https://docs.microsoft.com/en-us/azure/). + +### Environment Setup + +We'll make use of the following environment variables throughout the setup. +Edit the variables below with your correct information. + +```bash +# Storage account to use +export STORAGE_ACCOUNT="StorageAccountName" + +# Storage container to upload to +export STORAGE_CONTAINER="StorageContainerName" + +# Resource group name +export GROUP="ResourceGroupName" + +# Location +export LOCATION="centralus" + +# Get storage account connection string based on info above +export CONNECTION=$(az storage account show-connection-string \ + -n $STORAGE_ACCOUNT \ + -g $GROUP \ + -o tsv) +``` + +### Create the Image + +First, download the Azure image from a [Talos release](https://github.com/talos-systems/talos/releases). +Once downloaded, untar with `tar -xvf /path/to/azure-amd64.tar.gz` + +#### Upload the VHD + +Once you have pulled down the image, you can upload it to blob storage with: + +```bash +az storage blob upload \ + --connection-string $CONNECTION \ + --container-name $STORAGE_CONTAINER \ + -f /path/to/extracted/talos-azure.vhd \ + -n talos-azure.vhd +``` + +#### Register the Image + +Now that the image is present in our blob storage, we'll register it. + +```bash +az image create \ + --name talos \ + --source https://$STORAGE_ACCOUNT.blob.core.windows.net/$STORAGE_CONTAINER/talos-azure.vhd \ + --os-type linux \ + -g $GROUP +``` + +### Network Infrastructure + +#### Virtual Networks and Security Groups + +Once the image is prepared, we'll want to work through setting up the network. +Issue the following to create a network security group and add rules to it. + +```bash +# Create vnet +az network vnet create \ + --resource-group $GROUP \ + --location $LOCATION \ + --name talos-vnet \ + --subnet-name talos-subnet + +# Create network security group +az network nsg create -g $GROUP -n talos-sg + +# Client -> apid +az network nsg rule create \ + -g $GROUP \ + --nsg-name talos-sg \ + -n apid \ + --priority 1001 \ + --destination-port-ranges 50000 \ + --direction inbound + +# Trustd +az network nsg rule create \ + -g $GROUP \ + --nsg-name talos-sg \ + -n trustd \ + --priority 1002 \ + --destination-port-ranges 50001 \ + --direction inbound + +# etcd +az network nsg rule create \ + -g $GROUP \ + --nsg-name talos-sg \ + -n etcd \ + --priority 1003 \ + --destination-port-ranges 2379-2380 \ + --direction inbound + +# Kubernetes API Server +az network nsg rule create \ + -g $GROUP \ + --nsg-name talos-sg \ + -n kube \ + --priority 1004 \ + --destination-port-ranges 6443 \ + --direction inbound +``` + +#### Load Balancer + +We will create a public ip, load balancer, and a health check that we will use for our control plane. + +```bash +# Create public ip +az network public-ip create \ + --resource-group $GROUP \ + --name talos-public-ip \ + --allocation-method static + +# Create lb +az network lb create \ + --resource-group $GROUP \ + --name talos-lb \ + --public-ip-address talos-public-ip \ + --frontend-ip-name talos-fe \ + --backend-pool-name talos-be-pool + +# Create health check +az network lb probe create \ + --resource-group $GROUP \ + --lb-name talos-lb \ + --name talos-lb-health \ + --protocol tcp \ + --port 6443 + +# Create lb rule for 6443 +az network lb rule create \ + --resource-group $GROUP \ + --lb-name talos-lb \ + --name talos-6443 \ + --protocol tcp \ + --frontend-ip-name talos-fe \ + --frontend-port 6443 \ + --backend-pool-name talos-be-pool \ + --backend-port 6443 \ + --probe-name talos-lb-health +``` + +#### Network Interfaces + +In Azure, we have to pre-create the NICs for our control plane so that they can be associated with our load balancer. + +```bash +for i in $( seq 0 1 2 ); do + # Create public IP for each nic + az network public-ip create \ + --resource-group $GROUP \ + --name talos-controlplane-public-ip-$i \ + --allocation-method static + + + # Create nic + az network nic create \ + --resource-group $GROUP \ + --name talos-controlplane-nic-$i \ + --vnet-name talos-vnet \ + --subnet talos-subnet \ + --network-security-group talos-sg \ + --public-ip-address talos-controlplane-public-ip-$i\ + --lb-name talos-lb \ + --lb-address-pools talos-be-pool +done +``` + +### Cluster Configuration + +With our networking bits setup, we'll fetch the IP for our load balancer and create our configuration files. + +```bash +LB_PUBLIC_IP=$(az network public-ip show \ + --resource-group $GROUP \ + --name talos-public-ip \ + --query [ipAddress] \ + --output tsv) + +talosctl gen config talos-k8s-azure-tutorial https://${LB_PUBLIC_IP}:6443 +``` + +### Compute Creation + +We are now ready to create our azure nodes. + +```bash +# Create availability set +az vm availability-set create \ + --name talos-controlplane-av-set \ + -g $GROUP + +# Create the controlplane nodes +for i in $( seq 1 3 ); do + az vm create \ + --name talos-controlplane-$i \ + --image talos \ + --custom-data ./controlplane.yaml \ + -g $GROUP \ + --admin-username talos \ + --generate-ssh-keys \ + --verbose \ + --boot-diagnostics-storage $STORAGE_ACCOUNT \ + --os-disk-size-gb 20 \ + --nics talos-controlplane-nic-$i \ + --availability-set talos-controlplane-av-set \ + --no-wait +done + +# Create worker node + az vm create \ + --name talos-worker-0 \ + --image talos \ + --vnet-name talos-vnet \ + --subnet talos-subnet \ + --custom-data ./join.yaml \ + -g $GROUP \ + --admin-username talos \ + --generate-ssh-keys \ + --verbose \ + --boot-diagnostics-storage $STORAGE_ACCOUNT \ + --nsg talos-sg \ + --os-disk-size-gb 20 \ + --no-wait + +# NOTES: +# `--admin-username` and `--generate-ssh-keys` are required by the az cli, +# but are not actually used by talos +# `--os-disk-size-gb` is the backing disk for Kubernetes and any workload containers +# `--boot-diagnostics-storage` is to enable console output which may be necessary +# for troubleshooting +``` + +### Bootstrap Etcd + +You should now be able to interact with your cluster with `talosctl`. +We will need to discover the public IP for our first control plane node first. + +```bash +CONTROL_PLANE_0_IP=$(az network public-ip show \ + --resource-group $GROUP \ + --name talos-controlplane-public-ip-0 \ + --query [ipAddress] \ + --output tsv) +``` + +Set the `endpoints` and `nodes`: + +```bash +talosctl --talosconfig talosconfig config endpoint $CONTROL_PLANE_0_IP +talosctl --talosconfig talosconfig config node $CONTROL_PLANE_0_IP +``` + +Bootstrap `etcd`: + +```bash +talosctl --talosconfig talosconfig bootstrap +``` + +### Retrieve the `kubeconfig` + +At this point we can retrieve the admin `kubeconfig` by running: + +```bash +talosctl --talosconfig talosconfig kubeconfig . +``` diff --git a/website/content/docs/v0.12/Cloud Platforms/digitalocean.md b/website/content/docs/v0.12/Cloud Platforms/digitalocean.md new file mode 100644 index 0000000000..6ae0795842 --- /dev/null +++ b/website/content/docs/v0.12/Cloud Platforms/digitalocean.md @@ -0,0 +1,157 @@ +--- +title: "DigitalOcean" +description: "Creating a cluster via the CLI on DigitalOcean." +--- + +## Creating a Cluster via the CLI + +In this guide we will create an HA Kubernetes cluster with 1 worker node. +We assume an existing [Space](https://www.digitalocean.com/docs/spaces/), and some familiarity with DigitalOcean. +If you need more information on DigitalOcean specifics, please see the [official DigitalOcean documentation](https://www.digitalocean.com/docs/). + +### Create the Image + +First, download the DigitalOcean image from a Talos release. +Extract the archive to get the `disk.raw` file, compress it using `gzip` to `disk.raw.gz`. + +Using an upload method of your choice (`doctl` does not have Spaces support), upload the image to a space. +Now, create an image using the URL of the uploaded image: + +```bash +doctl compute image create \ + --region $REGION \ + --image-description talos-digital-ocean-tutorial \ + --image-url https://talos-tutorial.$REGION.digitaloceanspaces.com/disk.raw.gz \ + Talos +``` + +Save the image ID. +We will need it when creating droplets. + +### Create a Load Balancer + +```bash +doctl compute load-balancer create \ + --region $REGION \ + --name talos-digital-ocean-tutorial-lb \ + --tag-name talos-digital-ocean-tutorial-control-plane \ + --health-check protocol:tcp,port:6443,check_interval_seconds:10,response_timeout_seconds:5,healthy_threshold:5,unhealthy_threshold:3 \ + --forwarding-rules entry_protocol:tcp,entry_port:443,target_protocol:tcp,target_port:6443 +``` + +We will need the IP of the load balancer. +Using the ID of the load balancer, run: + +```bash +doctl compute load-balancer get --format IP +``` + +Save it, as we will need it in the next step. + +### Create the Machine Configuration Files + +#### Generating Base Configurations + +Using the DNS name of the loadbalancer created earlier, generate the base configuration files for the Talos machines: + +```bash +$ talosctl gen config talos-k8s-digital-ocean-tutorial https://: +created controlplane.yaml +created join.yaml +created talosconfig +``` + +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 cloud +controlplane.yaml is valid for cloud mode +$ talosctl validate --config join.yaml --mode cloud +join.yaml is valid for cloud mode +``` + +### Create the Droplets + +#### Create the Control Plane Nodes + +Run the following twice, to give ourselves three total control plane nodes: + +```bash +doctl compute droplet create \ + --region $REGION \ + --image \ + --size s-2vcpu-4gb \ + --enable-private-networking \ + --tag-names talos-digital-ocean-tutorial-control-plane \ + --user-data-file controlplane.yaml \ + --ssh-keys \ + talos-control-plane-1 +doctl compute droplet create \ + --region $REGION \ + --image \ + --size s-2vcpu-4gb \ + --enable-private-networking \ + --tag-names talos-digital-ocean-tutorial-control-plane \ + --user-data-file controlplane.yaml \ + --ssh-keys \ + talos-control-plane-2 +doctl compute droplet create \ + --region $REGION \ + --image \ + --size s-2vcpu-4gb \ + --enable-private-networking \ + --tag-names talos-digital-ocean-tutorial-control-plane \ + --user-data-file controlplane.yaml \ + --ssh-keys \ + talos-control-plane-3 +``` + +> Note: Although SSH is not used by Talos, DigitalOcean still requires that an SSH key be associated with the droplet. +> Create a dummy key that can be used to satisfy this requirement. + +#### Create the Worker Nodes + +Run the following to create a worker node: + +```bash +doctl compute droplet create \ + --region $REGION \ + --image \ + --size s-2vcpu-4gb \ + --enable-private-networking \ + --user-data-file join.yaml \ + --ssh-keys \ + talos-worker-1 +``` + +### Bootstrap Etcd + +To configure `talosctl` we will need the first control plane node's IP: + +```bash +doctl compute droplet get --format PublicIPv4 +``` + +Set the `endpoints` and `nodes`: + +```bash +talosctl --talosconfig talosconfig config endpoint +talosctl --talosconfig talosconfig config node +``` + +Bootstrap `etcd`: + +```bash +talosctl --talosconfig talosconfig bootstrap +``` + +### Retrieve the `kubeconfig` + +At this point we can retrieve the admin `kubeconfig` by running: + +```bash +talosctl --talosconfig talosconfig kubeconfig . +``` diff --git a/website/content/docs/v0.12/Cloud Platforms/gcp.md b/website/content/docs/v0.12/Cloud Platforms/gcp.md new file mode 100644 index 0000000000..7a4621d2c2 --- /dev/null +++ b/website/content/docs/v0.12/Cloud Platforms/gcp.md @@ -0,0 +1,185 @@ +--- +title: "GCP" +description: "Creating a cluster via the CLI on Google Cloud Platform." +--- + +## Creating a Cluster via the CLI + +In this guide, we will create an HA Kubernetes cluster in GCP with 1 worker node. +We will assume an existing [Cloud Storage bucket](https://cloud.google.com/storage/docs/creating-buckets), and some familiarity with Google Cloud. +If you need more information on Google Cloud specifics, please see the [official Google documentation](https://cloud.google.com/docs/). + +### Environment Setup + +We'll make use of the following environment variables throughout the setup. +Edit the variables below with your correct information. + +```bash +# Storage account to use +export STORAGE_BUCKET="StorageBucketName" +# Region +export REGION="us-central1" +``` + +### Create the Image + +First, download the Google Cloud image from a Talos [release](https://github.com/talos-systems/talos/releases). +These images are called `gcp-$ARCH.tar.gz`. + +#### Upload the Image + +Once you have downloaded the image, you can upload it to your storage bucket with: + +```bash +gsutil cp /path/to/gcp-amd64.tar.gz gs://$STORAGE_BUCKET +``` + +#### Register the image + +Now that the image is present in our bucket, we'll register it. + +```bash +gcloud compute images create talos \ + --source-uri=gs://$STORAGE_BUCKET/gcp-amd64.tar.gz \ + --guest-os-features=VIRTIO_SCSI_MULTIQUEUE +``` + +### Network Infrastructure + +#### Load Balancers and Firewalls + +Once the image is prepared, we'll want to work through setting up the network. +Issue the following to create a firewall, load balancer, and their required components. + +```bash +# Create Instance Group +gcloud compute instance-groups unmanaged create talos-ig \ + --zone $REGION-b + +# Create port for IG +gcloud compute instance-groups set-named-ports talos-ig \ + --named-ports tcp6443:6443 \ + --zone $REGION-b + +# Create health check +gcloud compute health-checks create tcp talos-health-check --port 6443 + +# Create backend +gcloud compute backend-services create talos-be \ + --global \ + --protocol TCP \ + --health-checks talos-health-check \ + --timeout 5m \ + --port-name tcp6443 + +# Add instance group to backend +gcloud compute backend-services add-backend talos-be \ + --global \ + --instance-group talos-ig \ + --instance-group-zone $REGION-b + +# Create tcp proxy +gcloud compute target-tcp-proxies create talos-tcp-proxy \ + --backend-service talos-be \ + --proxy-header NONE + +# Create LB IP +gcloud compute addresses create talos-lb-ip --global + +# Forward 443 from LB IP to tcp proxy +gcloud compute forwarding-rules create talos-fwd-rule \ + --global \ + --ports 443 \ + --address talos-lb-ip \ + --target-tcp-proxy talos-tcp-proxy + +# Create firewall rule for health checks +gcloud compute firewall-rules create talos-controlplane-firewall \ + --source-ranges 130.211.0.0/22,35.191.0.0/16 \ + --target-tags talos-controlplane \ + --allow tcp:6443 + +# Create firewall rule to allow talosctl access +gcloud compute firewall-rules create talos-controlplane-talosctl \ + --source-ranges 0.0.0.0/0 \ + --target-tags talos-controlplane \ + --allow tcp:50000 +``` + +### Cluster Configuration + +With our networking bits setup, we'll fetch the IP for our load balancer and create our configuration files. + +```bash +LB_PUBLIC_IP=$(gcloud compute forwarding-rules describe talos-fwd-rule \ + --global \ + --format json \ + | jq -r .IPAddress) + +talosctl gen config talos-k8s-gcp-tutorial https://${LB_PUBLIC_IP}:443 +``` + +Additionally, you can specify `--config-patch` with RFC6902 jsonpatch which will be applied during the config generation. + +### Compute Creation + +We are now ready to create our GCP nodes. + +```bash +# Create the control plane nodes. +for i in $( seq 1 3 ); do + gcloud compute instances create talos-controlplane-$i \ + --image talos \ + --zone $REGION-b \ + --tags talos-controlplane \ + --boot-disk-size 20GB \ + --metadata-from-file=user-data=./controlplane.yaml +done + +# Add control plane nodes to instance group +for i in $( seq 0 1 3 ); do + gcloud compute instance-groups unmanaged add-instances talos-ig \ + --zone $REGION-b \ + --instances talos-controlplane-$i +done + +# Create worker +gcloud compute instances create talos-worker-0 \ + --image talos \ + --zone $REGION-b \ + --boot-disk-size 20GB \ + --metadata-from-file=user-data=./join.yaml +``` + +### Bootstrap Etcd + +You should now be able to interact with your cluster with `talosctl`. +We will need to discover the public IP for our first control plane node first. + +```bash +CONTROL_PLANE_0_IP=$(gcloud compute instances describe talos-controlplane-0 \ + --zone $REGION-b \ + --format json \ + | jq -r '.networkInterfaces[0].accessConfigs[0].natIP') +``` + +Set the `endpoints` and `nodes`: + +```bash +talosctl --talosconfig talosconfig config endpoint $CONTROL_PLANE_0_IP +talosctl --talosconfig talosconfig config node $CONTROL_PLANE_0_IP +``` + +Bootstrap `etcd`: + +```bash +talosctl --talosconfig talosconfig bootstrap +``` + +### Retrieve the `kubeconfig` + +At this point we can retrieve the admin `kubeconfig` by running: + +```bash +talosctl --talosconfig talosconfig kubeconfig . +``` diff --git a/website/content/docs/v0.12/Cloud Platforms/openstack.md b/website/content/docs/v0.12/Cloud Platforms/openstack.md new file mode 100644 index 0000000000..0fe0dab973 --- /dev/null +++ b/website/content/docs/v0.12/Cloud Platforms/openstack.md @@ -0,0 +1,146 @@ +--- +title: "Openstack" +description: "Creating a cluster via the CLI on Openstack." +--- + +## Creating a Cluster via the CLI + +In this guide, we will create an HA Kubernetes cluster in Openstack with 1 worker node. +We will assume an existing some familiarity with Openstack. +If you need more information on Openstack specifics, please see the [official Openstack documentation](https://docs.openstack.org). + +### Environment Setup + +You should have an existing openrc file. +This file will provide environment variables necessary to talk to your Openstack cloud. +See [here](https://docs.openstack.org/newton/user-guide/common/cli-set-environment-variables-using-openstack-rc.html) for instructions on fetching this file. + +### Create the Image + +First, download the Openstack image from a Talos [release](https://github.com/talos-systems/talos/releases). +These images are called `openstack-$ARCH.tar.gz`. +Untar this file with `tar -xvf openstack-$ARCH.tar.gz`. +The resulting file will be called `disk.raw`. + +#### Upload the Image + +Once you have the image, you can upload to Openstack with: + +```bash +openstack image create --public --disk-format raw --file disk.raw talos +``` + +### Network Infrastructure + +#### Load Balancer and Network Ports + +Once the image is prepared, you will need to work through setting up the network. +Issue the following to create a load balancer, the necessary network ports for each control plane node, and associations between the two. + +Creating loadbalancer: + +```bash +# Create load balancer, updating vip-subnet-id if necessary +openstack loadbalancer create --name talos-control-plane --vip-subnet-id public + +# Create listener +openstack loadbalancer listener create --name talos-control-plane-listener --protocol TCP --protocol-port 6443 talos-control-plane + +# Pool and health monitoring +openstack loadbalancer pool create --name talos-control-plane-pool --lb-algorithm ROUND_ROBIN --listener talos-control-plane-listener --protocol TCP +openstack loadbalancer healthmonitor create --delay 5 --max-retries 4 --timeout 10 --type TCP talos-control-plane-pool +``` + +Creating ports: + +```bash +# Create ports for control plane nodes, updating network name if necessary +openstack port create --network shared talos-control-plane-1 +openstack port create --network shared talos-control-plane-2 +openstack port create --network shared talos-control-plane-3 + +# Create floating IPs for the ports, so that you will have talosctl connectivity to each control plane +openstack floating ip create --port talos-control-plane-1 public +openstack floating ip create --port talos-control-plane-2 public +openstack floating ip create --port talos-control-plane-3 public +``` + +> Note: Take notice of the private and public IPs associated with each of these ports, as they will be used in the next step. +> Additionally, take node of the port ID, as it will be used in server creation. + +Associate port's private IPs to loadbalancer: + +```bash +# Create members for each port IP, updating subnet-id and address as necessary. +openstack loadbalancer member create --subnet-id shared-subnet --address --protocol-port 6443 talos-control-plane-pool +openstack loadbalancer member create --subnet-id shared-subnet --address --protocol-port 6443 talos-control-plane-pool +openstack loadbalancer member create --subnet-id shared-subnet --address --protocol-port 6443 talos-control-plane-pool +``` + +#### Security Groups + +This example uses the default security group in Openstack. +Ports have been opened to ensure that connectivity from both inside and outside the group is possible. +You will want to allow, at a minimum, ports 6443 (Kubernetes API server) and 50000 (Talos API) from external sources. +It is also recommended to allow communication over all ports from within the subnet. + +### Cluster Configuration + +With our networking bits setup, we'll fetch the IP for our load balancer and create our configuration files. + +```bash +LB_PUBLIC_IP=$(openstack loadbalancer show talos-control-plane -f json | jq -r .vip_address) + +talosctl gen config talos-k8s-openstack-tutorial https://${LB_PUBLIC_IP}:6443 +``` + +Additionally, you can specify `--config-patch` with RFC6902 jsonpatch which will be applied during the config generation. + +### Compute Creation + +We are now ready to create our Openstack nodes. + +Create control plane: + +```bash +# Create control planes 2 and 3, substituting the same info. +for i in $( seq 1 3 ); do + openstack server create talos-control-plane-$i --flavor m1.small --nic port-id=talos-control-plane-$i --image talos --user-data /path/to/controlplane.yaml +done +``` + +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 +``` + +> Note: This step can be repeated to add more workers. + +### Bootstrap Etcd + +You should now be able to interact with your cluster with `talosctl`. +We will use one of the floating IPs we allocated earlier. +It does not matter which one. + +Set the `endpoints` and `nodes`: + +```bash +talosctl --talosconfig talosconfig config endpoint +talosctl --talosconfig talosconfig config node +``` + +Bootstrap `etcd`: + +```bash +talosctl --talosconfig talosconfig bootstrap +``` + +### Retrieve the `kubeconfig` + +At this point we can retrieve the admin `kubeconfig` by running: + +```bash +talosctl --talosconfig talosconfig kubeconfig . +``` diff --git a/website/content/docs/v0.12/Guides/advanced-networking.md b/website/content/docs/v0.12/Guides/advanced-networking.md new file mode 100644 index 0000000000..b88526dea4 --- /dev/null +++ b/website/content/docs/v0.12/Guides/advanced-networking.md @@ -0,0 +1,84 @@ +--- +title: "Advanced Networking" +--- + +## Static Addressing + +Static addressing is comprised of specifying `cidr`, `routes` ( remember to add your default gateway ), and `interface`. +Most likely you'll also want to define the `nameservers` so you have properly functioning DNS. + +```yaml +machine: + network: + hostname: talos + nameservers: + - 10.0.0.1 + interfaces: + - interface: eth0 + cidr: 10.0.0.201/8 + mtu: 8765 + routes: + - network: 0.0.0.0/0 + gateway: 10.0.0.1 + - interface: eth1 + ignore: true + time: + servers: + - time.cloudflare.com +``` + +## Additional Addresses for an Interface + +In some environments you may need to set additional addresses on an interface. +In the following example, we set two additional addresses on the loopback interface. + +```yaml +machine: + network: + interfaces: + - interface: lo0 + cidr: 192.168.0.21/24 + - interface: lo0 + cidr: 10.2.2.2/24 +``` + +## Bonding + +The following example shows how to create a bonded interface. + +```yaml +machine: + network: + interfaces: + - interface: bond0 + dhcp: true + bond: + mode: 802.3ad + lacprate: fast + hashpolicy: layer3+4 + miimon: 100 + updelay: 200 + downdelay: 200 + interfaces: + - eth0 + - eth1 +``` + +## VLANs + +To setup vlans on a specific device use an array of VLANs to add. +The master device may be configured without addressing by setting dhcp to false. + +```yaml +machine: + network: + interfaces: + - interface: eth0 + dhcp: false + vlans: + - vlanId: 100 + cidr: "192.168.2.10/28" + routes: + - network: 0.0.0.0/0 + gateway: 192.168.2.1 +``` diff --git a/website/content/docs/v0.12/Guides/air-gapped.md b/website/content/docs/v0.12/Guides/air-gapped.md new file mode 100644 index 0000000000..8358e2c934 --- /dev/null +++ b/website/content/docs/v0.12/Guides/air-gapped.md @@ -0,0 +1,137 @@ +--- +title: Air-gapped Environments +--- + +In this guide we will create a Talos cluster running in an air-gapped environment with all the required images being pulled from an internal registry. +We will use the [QEMU](../../local-platforms/qemu/) provisioner available in `talosctl` to create a local cluster, but the same approach could be used to deploy Talos in bigger air-gapped networks. + +## Requirements + +The follow are requirements for this guide: + +- Docker 18.03 or greater +- Requirements for the Talos [QEMU](../../local-platforms/qemu/) cluster + +## Identifying Images + +In air-gapped environments, access to the public Internet is restricted, so Talos can't pull images from public Docker registries (`docker.io`, `ghcr.io`, etc.) +We need to identify the images required to install and run Talos. +The same strategy can be used for images required by custom workloads running on the cluster. + +The `talosctl images` command provides a list of default images used by the Talos cluster (with default configuration +settings). +To print the list of images, run: + +```bash +talosctl images +``` + +This list contains images required by a default deployment of Talos. +There might be additional images required for the workloads running on this cluster, and those should be added to this list. + +## Preparing the Internal Registry + +As access to the public registries is restricted, we have to run an internal Docker registry. +In this guide, we will launch the registry on the same machine using Docker: + +```bash +$ docker run -d -p 6000:5000 --restart always --name registry-aigrapped registry:2 +1bf09802bee1476bc463d972c686f90a64640d87dacce1ac8485585de69c91a5 +``` + +This registry will be accepting connections on port 6000 on the host IPs. +The registry is empty by default, so we have fill it with the images required by Talos. + +First, we pull all the images to our local Docker daemon: + +```bash +$ for image in `talosctl images`; do docker pull $image; done +v0.12.0-amd64: Pulling from coreos/flannel +Digest: sha256:6d451d92c921f14bfb38196aacb6e506d4593c5b3c9d40a8b8a2506010dc3e10 +... +``` + +All images are now stored in the Docker daemon store: + +```bash +$ docker images +ghcr.io/talos-systems/install-cni v0.3.0-12-g90722c3 980d36ee2ee1 5 days ago 79.7MB +k8s.gcr.io/kube-proxy-amd64 v1.20.0 33c60812eab8 2 weeks ago 118MB +... +``` + +Now we need to re-tag them so that we can push them to our local registry. +We are going to replace the first component of the image name (before the first slash) with our registry endpoint `127.0.0.1:6000`: + +```bash +$ for image in `talosctl images`; do \ + docker tag $image `echo $image | sed -E 's#^[^/]+/#127.0.0.1:6000/#'` \ + done +``` + +As the next step, we push images to the internal registry: + +```bash +$ for image in `talosctl images`; do \ + docker push `echo $image | sed -E 's#^[^/]+/#127.0.0.1:6000/#'` \ + done +``` + +We can now verify that the images are pushed to the registry: + +```bash +$ curl http://127.0.0.1:6000/v2/_catalog +{"repositories":["autonomy/kubelet","coredns","coreos/flannel","etcd-development/etcd","kube-apiserver-amd64","kube-controller-manager-amd64","kube-proxy-amd64","kube-scheduler-amd64","talos-systems/install-cni","talos-systems/installer"]} +``` + +> Note: images in the registry don't have the registry endpoint prefix anymore. + +## Launching Talos in an Air-gapped Environment + +For Talos to use the internal registry, we use the registry mirror feature to redirect all the image pull requests to the internal registry. +This means that the registry endpoint (as the first component of the image reference) gets ignored, and all pull requests are sent directly to the specified endpoint. + +We are going to use a QEMU-based Talos cluster for this guide, but the same approach works with Docker-based clusters as well. +As QEMU-based clusters go through the Talos install process, they can be used better to model a real air-gapped environment. + +The `talosctl cluster create` command provides conveniences for common configuration options. +The only required flag for this guide is `--registry-mirror '*'=http://10.5.0.1:6000` which redirects every pull request to the internal registry. +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 +validating CIDR and reserving IPs +generating PKI and tokens +creating state directory in "/home/smira/.talos/clusters/talos-default" +creating network talos-default +creating load balancer +creating dhcpd +creating master nodes +creating worker nodes +waiting for API +... +``` + +> Note: `--install-image` should match the image which was copied into the internal registry in the previous step. + +You can be verify that the cluster is air-gapped by inspecting the registry logs: `docker logs -f registry-airgapped`. + +## Closing Notes + +Running in an air-gapped environment might require additional configuration changes, for example using custom settings for DNS and NTP servers. + +When scaling this guide to the bare-metal environment, following Talos config snippet could be used as an equivalent of the `--registry-mirror` flag above: + +```bash +machine: + ... + registries: + mirrors: + '*': + endpoints: + - http://10.5.0.1:6000/ +... +``` + +Other implementations of Docker registry can be used in place of the Docker `registry` image used above to run the registry. +If required, auth can be configured for the internal registry (and custom TLS certificates if needed). diff --git a/website/content/docs/v0.12/Guides/configuring-certificate-authorities.md b/website/content/docs/v0.12/Guides/configuring-certificate-authorities.md new file mode 100644 index 0000000000..e759c5054a --- /dev/null +++ b/website/content/docs/v0.12/Guides/configuring-certificate-authorities.md @@ -0,0 +1,21 @@ +--- +title: "Configuring Certificate Authorities" +description: "" +--- + +## Appending the Certificate Authority + +Put into each machine the PEM encoded certificate: + +```yaml +machine: + ... + files: + - content: | + -----BEGIN CERTIFICATE----- + ... + -----END CERTIFICATE----- + permissions: 0644 + path: /etc/ssl/certs/ca-certificates + op: append +``` diff --git a/website/content/docs/v0.12/Guides/configuring-containerd.md b/website/content/docs/v0.12/Guides/configuring-containerd.md new file mode 100644 index 0000000000..192a2303da --- /dev/null +++ b/website/content/docs/v0.12/Guides/configuring-containerd.md @@ -0,0 +1,33 @@ +--- +title: "Configuring Containerd" +description: "" +--- + +The base containerd configuration expects to merge in any additional configs present in `/var/cri/conf.d/*.toml`. + +## An example of exposing metrics + +Into each machine config, add the following: + +```yaml +machine: + ... + files: + - content: | + [metrics] + address = "0.0.0.0:11234" + path: /var/cri/conf.d/metrics.toml + op: create +``` + +Create cluster like normal and see that metrics are now present on this port: + +```bash +$ curl 127.0.0.1:11234/v1/metrics +# HELP container_blkio_io_service_bytes_recursive_bytes The blkio io service bytes recursive +# TYPE container_blkio_io_service_bytes_recursive_bytes gauge +container_blkio_io_service_bytes_recursive_bytes{container_id="0677d73196f5f4be1d408aab1c4125cf9e6c458a4bea39e590ac779709ffbe14",device="/dev/dm-0",major="253",minor="0",namespace="k8s.io",op="Async"} 0 +container_blkio_io_service_bytes_recursive_bytes{container_id="0677d73196f5f4be1d408aab1c4125cf9e6c458a4bea39e590ac779709ffbe14",device="/dev/dm-0",major="253",minor="0",namespace="k8s.io",op="Discard"} 0 +... +... +``` diff --git a/website/content/docs/v0.12/Guides/configuring-corporate-proxies.md b/website/content/docs/v0.12/Guides/configuring-corporate-proxies.md new file mode 100644 index 0000000000..8cc13ba45f --- /dev/null +++ b/website/content/docs/v0.12/Guides/configuring-corporate-proxies.md @@ -0,0 +1,52 @@ +--- +title: "Configuring Corporate Proxies" +description: "" +--- + +## Appending the Certificate Authority of MITM Proxies + +Put into each machine the PEM encoded certificate: + +```yaml +machine: + ... + files: + - content: | + -----BEGIN CERTIFICATE----- + ... + -----END CERTIFICATE----- + permissions: 0644 + path: /etc/ssl/certs/ca-certificates + op: append +``` + +## Configuring a Machine to Use the Proxy + +To make use of a proxy: + +```yaml +machine: + env: + http_proxy: + https_proxy: + no_proxy: +``` + +Additionally, configure the DNS `nameservers`, and NTP `servers`: + +```yaml +machine: + env: + ... + time: + servers: + - + - + - + ... + network: + nameservers: + - + - + - +``` diff --git a/website/content/docs/v0.12/Guides/configuring-network-connectivity.md b/website/content/docs/v0.12/Guides/configuring-network-connectivity.md new file mode 100644 index 0000000000..2254f4f2f4 --- /dev/null +++ b/website/content/docs/v0.12/Guides/configuring-network-connectivity.md @@ -0,0 +1,71 @@ +--- +title: "Configuring Network Connectivity" +description: "" +--- + +## Configuring Network Connectivity + +The simplest way to deploy Talos is by ensuring that all the remote components of the system (`talosctl`, the control plane nodes, and worker nodes) all have layer 2 connectivity. +This is not always possible, however, so this page lays out the minimal network access that is required to configure and operate a talos cluster. + +> Note: These are the ports required for Talos specifically, and should be configured _in addition_ to the ports required by kuberenetes. +> See the [kubernetes docs](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#check-required-ports) for information on the ports used by kubernetes itself. + +### Control plane node(s) + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ProtocolDirectionPort RangePurposeUsed By
TCPInbound50000*apidtalosctl
TCPInbound50001*trustdControl plane nodes, worker nodes
+ +> Ports marked with a `*` are not currently configurable, but that may change in the future. +> [Follow along here](https://github.com/talos-systems/talos/issues/1836). + +### Worker node(s) + + + + + + + + + + + + + + + + + + + + +
ProtocolDirectionPort RangePurposeUsed By
TCPInbound50001*trustdControl plane nodes
+ +> Ports marked with a `*` are not currently configurable, but that may change in the future. +> [Follow along here](https://github.com/talos-systems/talos/issues/1836). diff --git a/website/content/docs/v0.12/Guides/configuring-pull-through-cache.md b/website/content/docs/v0.12/Guides/configuring-pull-through-cache.md new file mode 100644 index 0000000000..3b2e05fbcf --- /dev/null +++ b/website/content/docs/v0.12/Guides/configuring-pull-through-cache.md @@ -0,0 +1,110 @@ +--- +title: Configuring Pull Through Cache +--- + +In this guide we will create a set of local caching Docker registry proxies to minimize local cluster startup time. + +When running Talos locally, pulling images from Docker registries might take a significant amount of time. +We spin up local caching pass-through registries to cache images and configure a local Talos cluster to use those proxies. +A similar approach might be used to run Talos in production in air-gapped environments. +It can be also used to verify that all the images are available in local registries. + +## Video Walkthrough + +To see a live demo of this writeup, see the video below: + + + +## Requirements + +The follow are requirements for creating the set of caching proxies: + +- Docker 18.03 or greater +- Local cluster requirements for either [docker](../../local-platforms/docker/) or [QEMU](../../local-platforms/qemu/). + +## Launch the Caching Docker Registry Proxies + +Talos pulls from `docker.io`, `k8s.gcr.io`, `quay.io`, `gcr.io`, and `ghcr.io` by default. +If your configuration is different, you might need to modify the commands below: + +```bash +docker run -d -p 5000:5000 \ + -e REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io \ + --restart always \ + --name registry-docker.io registry:2 + +docker run -d -p 5001:5000 \ + -e REGISTRY_PROXY_REMOTEURL=https://k8s.gcr.io \ + --restart always \ + --name registry-k8s.gcr.io registry:2 + +docker run -d -p 5002:5000 \ + -e REGISTRY_PROXY_REMOTEURL=https://quay.io \ + --restart always \ + --name registry-quay.io registry:2.5 + +docker run -d -p 5003:5000 \ + -e REGISTRY_PROXY_REMOTEURL=https://gcr.io \ + --restart always \ + --name registry-gcr.io registry:2 + +docker run -d -p 5004:5000 \ + -e REGISTRY_PROXY_REMOTEURL=https://ghcr.io \ + --restart always \ + --name registry-ghcr.io registry:2 +``` + +> Note: Proxies are started as docker containers, and they're automatically configured to start with Docker daemon. +> Please note that `quay.io` proxy doesn't support recent Docker image schema, so we run older registry image version (2.5). + +As a registry container can only handle a single upstream Docker registry, we launch a container per upstream, each on its own +host port (5000, 5001, 5002, 5003 and 5004). + +## Using Caching Registries with `QEMU` Local Cluster + +With a [QEMU](../../local-platforms/qemu/) local cluster, a bridge interface is created on the host. +As registry containers expose their ports on the host, we can use bridge IP to direct proxy requests. + +```bash +sudo talosctl cluster create --provisioner qemu \ + --registry-mirror docker.io=http://10.5.0.1:5000 \ + --registry-mirror k8s.gcr.io=http://10.5.0.1:5001 \ + --registry-mirror quay.io=http://10.5.0.1:5002 \ + --registry-mirror gcr.io=http://10.5.0.1:5003 \ + --registry-mirror ghcr.io=http://10.5.0.1:5004 +``` + +The Talos local cluster should now start pulling via caching registries. +This can be verified via registry logs, e.g. `docker logs -f registry-docker.io`. +The first time cluster boots, images are pulled and cached, so next cluster boot should be much faster. + +> Note: `10.5.0.1` is a bridge IP with default network (`10.5.0.0/24`), if using custom `--cidr`, value should be adjusted accordingly. + +## Using Caching Registries with `docker` Local Cluster + +With a [docker](../../local-platforms/docker/) local cluster we can use docker bridge IP, default value for that IP is `172.17.0.1`. +On Linux, the docker bridge address can be inspected with `ip addr show docker0`. + +```bash +talosctl cluster create --provisioner docker \ + --registry-mirror docker.io=http://172.17.0.1:5000 \ + --registry-mirror k8s.gcr.io=http://172.17.0.1:5001 \ + --registry-mirror quay.io=http://172.17.0.1:5002 \ + --registry-mirror gcr.io=http://172.17.0.1:5003 \ + --registry-mirror ghcr.io=http://172.17.0.1:5004 +``` + +## Cleaning Up + +To cleanup, run: + +```bash +docker rm -f registry-docker.io +docker rm -f registry-k8s.gcr.io +docker rm -f registry-quay.io +docker rm -f registry-gcr.io +docker rm -f registry-ghcr.io +``` + +> Note: Removing docker registry containers also removes the image cache. +> So if you plan to use caching registries, keep the containers running. diff --git a/website/content/docs/v0.12/Guides/configuring-the-cluster-endpoint.md b/website/content/docs/v0.12/Guides/configuring-the-cluster-endpoint.md new file mode 100644 index 0000000000..6348d42159 --- /dev/null +++ b/website/content/docs/v0.12/Guides/configuring-the-cluster-endpoint.md @@ -0,0 +1,45 @@ +--- +title: "Configuring the Cluster Endpoint" +description: "" +--- + +In this section, we will step through the configuration of a Talos based Kubernetes cluster. +There are three major components we will configure: + +- `apid` and `talosctl` +- the master nodes +- the worker nodes + +Talos enforces a high level of security by using mutual TLS for authentication and authorization. + +We recommend that the configuration of Talos be performed by a cluster owner. +A cluster owner should be a person of authority within an organization, perhaps a director, manager, or senior member of a team. +They are responsible for storing the root CA, and distributing the PKI for authorized cluster administrators. + +### Recommended settings + +Talos runs great out of the box, but if you tweak some minor settings it will make your life +a lot easier in the future. +This is not a requirement, but rather a document to explain some key settings. + +#### Endpoint + +To configure the `talosctl` endpoint, it is recommended you use a resolvable DNS name. +This way, if you decide to upgrade to a multi-controlplane cluster you only have to add the ip adres to the hostname configuration. +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. +> for more details, please see: [v1alpha1 endpoint configuration](../../reference/configuration/#controlplaneconfig) + +```yaml +..... +cluster: + controlPlane: + endpoint: https://endpoint.example.local:6443 +..... +``` + +If you have a DNS name as the endpoint, you can upgrade your talos cluster with multiple controlplanes in the future (if you don't have a multi-controlplane setup from the start) +Using a DNS name generates the corresponding Certificates (Kubernetes and Talos) for the correct hostname. diff --git a/website/content/docs/v0.12/Guides/configuring-wireguard-network.md b/website/content/docs/v0.12/Guides/configuring-wireguard-network.md new file mode 100644 index 0000000000..27dc41aa3d --- /dev/null +++ b/website/content/docs/v0.12/Guides/configuring-wireguard-network.md @@ -0,0 +1,101 @@ +--- +title: "Configuring Wireguard Network" +description: "In this guide you will learn how to set up Wireguard network using Kernel module." +--- + +## Configuring Wireguard Network + +### Quick Start + +The quickest way to try out Wireguard is to use `talosctl cluster create` command: + +```bash +talosctl cluster create --wireguard-cidr 10.1.0.0/24 +``` + +It will automatically generate Wireguard network configuration for each node with the following network topology: + + + +Where all controlplane nodes will be used as Wireguard servers which listen on port 51111. +All controlplanes and workers will connect to all controlplanes. +It also sets `PersistentKeepalive` to 5 seconds to establish controlplanes to workers connection. + +After the cluster is deployed it should be possible to verify Wireguard network connectivity. +It is possible to deploy a container with `hostNetwork` enabled, then do `kubectl exec /bin/bash` and either do: + +```bash +ping 10.1.0.2 +``` + +Or install `wireguard-tools` package and run: + +```bash +wg show +``` + +Wireguard show should output something like this: + +```bash +interface: wg0 + public key: OMhgEvNIaEN7zeCLijRh4c+0Hwh3erjknzdyvVlrkGM= + private key: (hidden) + listening port: 47946 + +peer: 1EsxUygZo8/URWs18tqB5FW2cLVlaTA+lUisKIf8nh4= + endpoint: 10.5.0.2:51111 + allowed ips: 10.1.0.0/24 + latest handshake: 1 minute, 55 seconds ago + transfer: 3.17 KiB received, 3.55 KiB sent + persistent keepalive: every 5 seconds +``` + +It is also possible to use generated configuration as a reference by pulling generated config files using: + +```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 +``` + +### Manual Configuration + +All Wireguard configuration can be done by changing Talos machine config files. +As an example we will use this official Wireguard [quick start tutorial](https://www.wireguard.com/quickstart/). + +### Key Generation + +This part is exactly the same: + +```bash +wg genkey | tee privatekey | wg pubkey > publickey +``` + +### Setting up Device + +Inline comments show relations between configs and `wg` quickstart tutorial commands: + +```yaml +... +network: + interfaces: + ... + # ip link add dev wg0 type wireguard + - interface: wg0 + mtu: 1500 + # ip address add dev wg0 192.168.2.1/24 + cidr: 192.168.2.1/24 + # wg set wg0 listen-port 51820 private-key /path/to/private-key peer ABCDEF... allowed-ips 192.168.88.0/24 endpoint 209.202.254.14:8172 + wireguard: + privateKey: + listenPort: 51820 + peers: + allowedIPs: + - 192.168.88.0/24 + endpoint: 209.202.254.14.8172 + publicKey: ABCDEF... +... +``` + +When `networkd` gets this configuration it will create the device, configure it and will bring it up (equivalent to `ip link set up dev wg0`). + +All supported config parameters are described in the [Machine Config Reference](../../reference/configuration/#devicewireguardconfig). diff --git a/website/content/docs/v0.12/Guides/converting-control-plane.md b/website/content/docs/v0.12/Guides/converting-control-plane.md new file mode 100644 index 0000000000..d7ec2ead62 --- /dev/null +++ b/website/content/docs/v0.12/Guides/converting-control-plane.md @@ -0,0 +1,257 @@ +--- +title: "Converting Control Plane" +description: "How to convert Talos self-hosted Kubernetes control plane (pre-0.9) to static pods based one." +--- + +Talos version 0.9 runs Kubernetes control plane in a new way: static pods managed by Talos. +Talos version 0.8 and below runs self-hosted control plane. +After Talos OS upgrade to version 0.9 Kubernetes control plane should be converted to run as static pods. + +This guide describes automated conversion script and also shows detailed manual conversion process. + +## Video Walkthrough + +To see a live demo of this writeup, see the video below: + + + +## Automated Conversion + +First, make sure all nodes are updated to Talos 0.9: + +```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 control-plane,master 58m v1.20.4 172.20.0.2 Talos (v0.9.0) 5.10.19-talos containerd://1.4.4 +talos-default-master-2 Ready control-plane,master 58m v1.20.4 172.20.0.3 Talos (v0.9.0) 5.10.19-talos containerd://1.4.4 +talos-default-master-3 Ready control-plane,master 58m v1.20.4 172.20.0.4 Talos (v0.9.0) 5.10.19-talos containerd://1.4.4 +talos-default-worker-1 Ready 58m v1.20.4 172.20.0.5 Talos (v0.9.0) 5.10.19-talos containerd://1.4.4 +``` + +Start the conversion script: + +```bash +$ talosctl -n convert-k8s +discovered master nodes ["172.20.0.2" "172.20.0.3" "172.20.0.4"] +current self-hosted status: true +gathering control plane configuration +aggregator CA key can't be recovered from bootkube-boostrapped control plane, generating new CA +patching master node "172.20.0.2" configuration +patching master node "172.20.0.3" configuration +patching master node "172.20.0.4" configuration +waiting for static pod definitions to be generated +waiting for manifests to be generated +Talos generated control plane static pod definitions and bootstrap manifests, please verify them with commands: + talosctl -n get StaticPods.kubernetes.talos.dev + talosctl -n get Manifests.kubernetes.talos.dev + +in order to remove self-hosted control plane, pod-checkpointer component needs to be disabled +once pod-checkpointer is disabled, the cluster shouldn't be rebooted until the entire conversion process is complete +confirm disabling pod-checkpointer to proceed with control plane update [yes/no]: +``` + +Script stops at this point waiting for confirmation. +Talos still runs self-hosted control plane, and static pods were not rendered yet. + +As instructed by the script, please verify that static pod definitions are correct: + +```bash +$ talosctl -n get staticpods -o yaml +node: 172.20.0.2 +metadata: + namespace: controlplane + type: StaticPods.kubernetes.talos.dev + id: kube-apiserver + version: 1 + phase: running +spec: + apiVersion: v1 + kind: Pod + metadata: + annotations: + talos.dev/config-version: "2" + talos.dev/secrets-version: "1" + creationTimestamp: null + labels: + k8s-app: kube-apiserver + tier: control-plane + name: kube-apiserver + namespace: kube-system + spec: + containers: + - command: +... +``` + +Static pod definitions are generated from the machine configuration and should match pod template as generated by Talos on bootstrap of self-hosted control plane unless there were some manual changes applied to the daemonset specs after bootstrap. +Talos patches the machine configuration with the container image versions scraped from the daemonset definition, fetches the service account key from Kubernetes secrets. + +Aggregator CA can't be recovered from the self-hosted control plane, so new CA gets generated. +This is generally harmless and not visible from outside the cluster. +The Aggregator CA is _not_ the same CA as is used by Talos or Kubernetes standard API. +It is a special PKI used for aggregating API extension services inside your cluster. +If you have non-standard apiserver aggregations (fairly rare, and you should know if you do), then you may need to restart these services after the new CA is in place. + +Verify that bootstrap manifests are correct: + +```bash +$ talosctl -n get manifests +NODE NAMESPACE TYPE ID VERSION +172.20.0.2 controlplane Manifest 00-kubelet-bootstrapping-token 1 +172.20.0.2 controlplane Manifest 01-csr-approver-role-binding 1 +172.20.0.2 controlplane Manifest 01-csr-node-bootstrap 1 +172.20.0.2 controlplane Manifest 01-csr-renewal-role-binding 1 +172.20.0.2 controlplane Manifest 02-kube-system-sa-role-binding 1 +172.20.0.2 controlplane Manifest 03-default-pod-security-policy 1 +172.20.0.2 controlplane Manifest 05-https://docs.projectcalico.org/manifests/calico.yaml 1 +172.20.0.2 controlplane Manifest 10-kube-proxy 1 +172.20.0.2 controlplane Manifest 11-core-dns 1 +172.20.0.2 controlplane Manifest 11-core-dns-svc 1 +172.20.0.2 controlplane Manifest 11-kube-config-in-cluster 1 +``` + +Make sure that manifests and static pods are correct across all control plane nodes, as each node reconciles +control plane state on its own. +For example, CNI configuration in machine config should be in sync across all the nodes. +Talos nodes try to create any missing Kubernetes resources from the manifests, but it never +updates or deletes existing resources. + +If something looks wrong, script can be aborted and machine configuration should be updated to fix the problem. +Once configuration is updated, the script can be restarted. + +If static pod definitions and manifests look good, confirm next step to disable `pod-checkpointer`: + +```bash +$ talosctl -n convert-k8s +... +confirm disabling pod-checkpointer to proceed with control plane update [yes/no]: yes +disabling pod-checkpointer +deleting daemonset "pod-checkpointer" +checking for active pod checkpoints +2021/03/09 23:37:25 retrying error: found 3 active pod checkpoints: [pod-checkpointer-655gc-talos-default-master-3 pod-checkpointer-pw6mv-talos-default-master-1 pod-checkpointer-zdw9z-talos-default-master-2] +2021/03/09 23:42:25 retrying error: found 1 active pod checkpoints: [pod-checkpointer-pw6mv-talos-default-master-1] +confirm applying static pod definitions and manifests [yes/no]: +``` + +Self-hosted control plane runs `pod-checkpointer` to work around issues with control plane availability. +It should be disabled before conversion starts to allow self-hosted control plane to be removed. +It takes around 5 minutes for the `pod-checkpointer` to be fully disabled. +Script verifies that all checkpoints are removed before proceeding. + +This last confirmation before proceeding is at the point when there is no way to keep running self-hosted control plane: +static pods are released, bootstrap manifests are applied, self-hosted control plane is removed. + +```bash +$ talosctl -n convert-k8s +... +confirm applying static pod definitions and manifests [yes/no]: yes +removing self-hosted initialized key +waiting for static pods for "kube-apiserver" to be present in the API server state +waiting for static pods for "kube-controller-manager" to be present in the API server state +waiting for static pods for "kube-scheduler" to be present in the API server state +deleting daemonset "kube-apiserver" +waiting for static pods for "kube-apiserver" to be present in the API server state +deleting daemonset "kube-controller-manager" +waiting for static pods for "kube-controller-manager" to be present in the API server state +deleting daemonset "kube-scheduler" +waiting for static pods for "kube-scheduler" to be present in the API server state +conversion process completed successfully +``` + +As soon as the control plane static pods are rendered, the kubelet starts the control plane static pods. +It is expected that the pods for `kube-apiserver` will crash initially. +Only one `kube-apiserver` can be bound to the host `Node`'s port 6443 at a time. +Eventually, the old `kube-apiserver` will be killed, and the new one will be able to start. +This is all handled automatically. +The script will continue by removing each self-hosted daemonset and verifying that static pods are ready and healthy. + +## Manual Conversion + +Check that Talos runs self-hosted control plane: + +```bash +$ talosctl -n get bs +NODE NAMESPACE TYPE ID VERSION SELF HOSTED +172.20.0.2 runtime BootstrapStatus control-plane 2 true +``` + +Talos machine configuration need to be updated to the 0.9 format; there are two new required machine configuration settings: + +* `.cluster.serviceAccount` is the service account PEM-encoded private key. +* `.cluster.aggregatorCA` is the aggregator CA for `kube-apiserver` (certficiate and private key). + +Current service account can be fetched from the Kubernetes secrets: + +```bash +$ kubectl -n kube-system get secrets kube-controller-manager -o jsonpath='{.data.service\-account\.key}' +LS0tLS1CRUdJTiBSU0EgUFJJVkFURS... +``` + +All control plane node machine configurations should be patched with the service account key: + +```bash +$ talosctl -n ,,... patch mc --immediate -p '[{"op": "add", "path": "/cluster/serviceAccount", "value": {"key": "LS0tLS1CRUdJTiBSU0EgUFJJVkFURS..."}}]' +patched mc at the node 172.20.0.2 +``` + +Aggregator CA can be generated using OpenSSL or any other certificate generation tools: RSA or ECDSA certificate with CN `front-proxy` valid for 10 years. +PEM-encoded CA certificate and key should be base64-encoded and patched into the machine config at path `/cluster/aggregatorCA`: + +```bash +$ talosctl -n ,,... patch mc --immediate -p '[{"op": "add", "path": "/cluster/aggregatorCA", "value": {"crt": "S0tLS1CRUdJTiBDRVJUSUZJQ...", "key": "LS0tLS1CRUdJTiBFQy..."}}]' +patched mc at the node 172.20.0.2 +``` + +At this point static pod definitions and bootstrap manifests should be rendered, please see "Automated Conversion" on how to verify generated objects. +Feel free to continue to refine your machine configuration until the generated static pod definitions and bootstrap manifests look good. + +If static pod definitions are not generated, check logs with `talosctl -n logs controller-runtime`. + +Disable `pod-checkpointer` with: + +```bash +$ kubectl -n kube-system delete ds pod-checkpointer +daemonset.apps "pod-checkpointer" deleted +``` + +Wait for all pod checkpoints to be removed: + +```bash +$ kubectl -n kube-system get pods +NAME READY STATUS RESTARTS AGE +... +pod-checkpointer-8q2lh-talos-default-master-2 1/1 Running 0 3m34s +pod-checkpointer-nnm5w-talos-default-master-3 1/1 Running 0 3m24s +pod-checkpointer-qnmdt-talos-default-master-1 1/1 Running 0 2m21s +``` + +Pod checkpoints have annotation `checkpointer.alpha.coreos.com/checkpoint-of`. + +Once all the pod checkpoints are removed (it takes 5 minutes for the checkpoints to be removed), proceed by removing self-hosted initialized key: + +```bash +talosctl -n convert-k8s --remove-initialized-key +``` + +Talos controllers will now render static pod definitions, and the kubelet will launch any resulting static pods. + +Once static pods are visible in `kubectl get pods -n kube-system` output, proceed by removing each of the self-hosted daemonsets: + +```bash +$ kubectl -n kube-system delete daemonset kube-apiserver +daemonset.apps "kube-apiserver" deleted +``` + +Make sure static pods for `kube-apiserver` got started successfully, pods are running and ready. + +Proceed by deleting `kube-controller-manager` and `kube-scheduler` daemonsets, verifying that static pods are running between each step: + +```bash +$ kubectl -n kube-system delete daemonset kube-controller-manager +daemonset.apps "kube-controller-manager" deleted +``` + +```bash +$ kubectl -n kube-system delete daemonset kube-scheduler +daemonset.apps "kube-scheduler" deleted +``` diff --git a/website/content/docs/v0.12/Guides/customizing-the-kernel.md b/website/content/docs/v0.12/Guides/customizing-the-kernel.md new file mode 100644 index 0000000000..22b76a959c --- /dev/null +++ b/website/content/docs/v0.12/Guides/customizing-the-kernel.md @@ -0,0 +1,49 @@ +--- +title: "Customizing the Kernel" +description: "" +--- + +The installer image contains [`ONBUILD`](https://docs.docker.com/engine/reference/builder/#onbuild) instructions that handle the following: + +- the decompression, and unpacking of the `initramfs.xz` +- the unsquashing of the rootfs +- the copying of new rootfs files +- the squashing of the new rootfs +- and the packing, and compression of the new `initramfs.xz` + +When used as a base image, the installer will perform the above steps automatically with the requirement that a `customization` stage be defined in the `Dockerfile`. + +Build and push your own kernel: + + ```sh + git clone https://github.com/talos-systems/pkgs.git + cd pkgs + make kernel-menuconfig USERNAME=_your_github_user_name_ + + docker login ghcr.io --username _your_github_user_name_ + make kernel USERNAME=_your_github_user_name_ PUSH=true + ``` + +Using a multi-stage `Dockerfile` we can define the `customization` stage and build `FROM` the installer image: + +```docker +FROM scratch AS customization +COPY --from= /lib/modules /lib/modules + +FROM ghcr.io/talos-systems/installer:latest +COPY --from= /boot/vmlinuz /usr/install/${TARGETARCH}/vmlinuz +``` + +When building the image, the `customization` stage will automatically be copied into the rootfs. +The `customization` stage is not limited to a single `COPY` instruction. +In fact, you can do whatever you would like in this stage, but keep in mind that everything in `/` will be copied into the rootfs. + +To build the image, run: + +```bash +DOCKER_BUILDKIT=0 docker build --build-arg RM="/lib/modules" -t installer:kernel . +``` + +> Note: buildkit has a bug [#816](https://github.com/moby/buildkit/issues/816), to disable it use `DOCKER_BUILDKIT=0` + +Now that we have a custom installer we can build Talos for the specific platform we wish to deploy to. diff --git a/website/content/docs/v0.12/Guides/customizing-the-root-filesystem.md b/website/content/docs/v0.12/Guides/customizing-the-root-filesystem.md new file mode 100644 index 0000000000..a543c372e6 --- /dev/null +++ b/website/content/docs/v0.12/Guides/customizing-the-root-filesystem.md @@ -0,0 +1,61 @@ +--- +title: "Customizing the Root Filesystem" +description: "" +--- + +The installer image contains [`ONBUILD`](https://docs.docker.com/engine/reference/builder/#onbuild) instructions that handle the following: + +- the decompression, and unpacking of the `initramfs.xz` +- the unsquashing of the rootfs +- the copying of new rootfs files +- the squashing of the new rootfs +- and the packing, and compression of the new `initramfs.xz` + +When used as a base image, the installer will perform the above steps automatically with the requirement that a `customization` stage be defined in the `Dockerfile`. + +For example, say we have an image that contains the contents of a library we wish to add to the Talos rootfs. +We need to define a stage with the name `customization`: + +```docker +FROM scratch AS customization +COPY --from= +``` + +Using a multi-stage `Dockerfile` we can define the `customization` stage and build `FROM` the installer image: + +```docker +FROM scratch AS customization +COPY --from= + +FROM ghcr.io/talos-systems/installer:latest +``` + +When building the image, the `customization` stage will automatically be copied into the rootfs. +The `customization` stage is not limited to a single `COPY` instruction. +In fact, you can do whatever you would like in this stage, but keep in mind that everything in `/` will be copied into the rootfs. + +> Note: `` is the path relative to the rootfs that you wish to place the contents of ``. + +To build the image, run: + +```bash +docker build --squash -t /installer:latest . +``` + +In the case that you need to perform some cleanup _before_ adding additional files to the rootfs, you can specify the `RM` [build-time variable](https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables---build-arg): + +```bash +docker build --squash --build-arg RM="[ ...]" -t /installer:latest . +``` + +This will perform a `rm -rf` on the specified paths relative to the rootfs. + +> Note: `RM` must be a whitespace delimited list. + +The resulting image can be used to: + +- generate an image for any of the supported providers +- perform bare-metall installs +- perform upgrades + +We will step through common customizations in the remainder of this section. diff --git a/website/content/docs/v0.12/Guides/deploy-metrics-server.md b/website/content/docs/v0.12/Guides/deploy-metrics-server.md new file mode 100644 index 0000000000..0471cdbfc6 --- /dev/null +++ b/website/content/docs/v0.12/Guides/deploy-metrics-server.md @@ -0,0 +1,43 @@ +--- +title: "Deploying Metrics Server" +description: "In this guide you will learn how to set up metrics-server." +--- + +Metrics Server enables use of the [Horizontal Pod Autoscaler](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) and [Vertical Pod Autoscaler](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler). +It does this by gathering metrics data from the kubelets in a cluster. +By default, the certificates in use by the kubelets will not be recognized by metrics-server. +This can be solved by either configuring metrics-server to do no validation of the TLS certificates, or by modifying the kubelet configuration to rotate its certificates and use ones that will be recognized by metrics-server. + +## Node Configuration + +To enable kubelet certificate rotation, all nodes should have the following Machine Config snippet: + +```yaml +machine: + kubelet: + extraArgs: + rotate-server-certificates: true +``` + +## Install During Bootstrap + +We will want to ensure that new certificates for the kubelets are approved automatically. +This can easily be done with the [Kubelet Serving Certificate Approver](https://github.com/alex1989hu/kubelet-serving-cert-approver), which will automatically approve the Certificate Signing Requests generated by the kubelets. + +We can have Kubelet Serving Certificate Approver and metrics-server installed on the cluster automatically during bootstrap by adding the following snippet to the Cluster Config of the node that will be handling the bootstrap process: + +```yaml +cluster: + extraManifests: + - https://raw.githubusercontent.com/alex1989hu/kubelet-serving-cert-approver/main/deploy/standalone-install.yaml + - https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml +``` + +## Install After Bootstrap + +If you choose not to use `extraManifests` to install Kubelet Serving Certificate Approver and metrics-server during bootstrap, you can install them once the cluster is online using `kubectl`: + +```sh +kubectl apply -f https://raw.githubusercontent.com/alex1989hu/kubelet-serving-cert-approver/main/deploy/standalone-install.yaml +kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml +``` diff --git a/website/content/docs/v0.12/Guides/disaster-recovery.md b/website/content/docs/v0.12/Guides/disaster-recovery.md new file mode 100644 index 0000000000..286b70080f --- /dev/null +++ b/website/content/docs/v0.12/Guides/disaster-recovery.md @@ -0,0 +1,147 @@ +--- +title: "Disaster Recovery" +description: "Procedure for snapshotting etcd database and recovering from catastrophic control plane failure." +--- + +`etcd` database backs Kubernetes control plane state, so if the `etcd` service is unavailable +Kubernetes control plane goes down, and the cluster is not recoverable until `etcd` is recovered with contents. +The `etcd` consistency model builds around the consensus protocol Raft, so for highly-available control plane clusters, +loss of one control plane node doesn't impact cluster health. +In general, `etcd` stays up as long as a sufficient number of nodes to maintain quorum are up. +For a three control plane node Talos cluster, this means that the cluster tolerates a failure of any single node, +but losing more than one node at the same time leads to complete loss of service. +Because of that, it is important to take routine backups of `etcd` state to have a snapshot to recover cluster from +in case of catastrophic failure. + +## Backup + +### Snapshotting `etcd` Database + +Create a consistent snapshot of `etcd` database with `talosctl etcd snapshot` command: + +```bash +$ talosctl -n etcd snapshot db.snapshot +etcd snapshot saved to "db.snapshot" (2015264 bytes) +snapshot info: hash c25fd181, revision 4193, total keys 1287, total size 3035136 +``` + +> Note: filename `db.snapshot` is arbitrary. + +This database snapshot can be taken on any healthy control plane node (with IP address `` in the example above), +as all `etcd` instances contain exactly same data. +It is recommended to configure `etcd` snapshots to be created on some schedule to allow point-in-time recovery using the latest snapshot. + +### Disaster Database Snapshot + +If `etcd` cluster is not healthy, the `talosctl etcd snapshot` command might fail. +In that case, copy the database snapshot directly from the control plane node: + +```bash +talosctl -n cp /var/lib/etcd/member/snap/db . +``` + +This snapshot might not be fully consistent (if the `etcd` process is running), but it allows +for disaster recovery when latest regular snapshot is not available. + +### Machine Configuration + +Machine configuration might be required to recover the node after hardware failure. +Backup Talos node machine configuration with the command: + +```bash +talosctl -n IP get mc v1alpha1 -o yaml | yq eval '.spec' - +``` + +## Recovery + +Before starting a disaster recovery procedure, make sure that `etcd` cluster can't be recovered: + +* get `etcd` cluster member list on all healthy control plane nodes with `talosctl -n IP etcd members` command and compare across all members. +* query `etcd` health across control plane nodes with `talosctl -n IP service etcd`. + +If the quorum can be restored, restoring quorum might be a better strategy than performing full disaster recovery +procedure. + +### Latest Etcd Snapshot + +Get hold of the latest `etcd` database snapshot. +If a snapshot is not fresh enough, create a database snapshot (see above), even if the `etcd` cluster is unhealthy. + +### Init Node + +Make sure that there are no control plane nodes with machine type `init`: + +```bash +$ talosctl -n ,,... get machinetype +NODE NAMESPACE TYPE ID VERSION TYPE +172.20.0.2 config MachineType machine-type 2 controlplane +172.20.0.4 config MachineType machine-type 2 controlplane +172.20.0.3 config MachineType machine-type 2 controlplane +``` + +Nodes with `init` type are incompatible with `etcd` recovery procedure. +`init` node can be converted to `controlplane` type with `talosctl edit mc --on-reboot` command followed +by node reboot with `talosctl reboot` command. + +### Preparing Control Plane Nodes + +If some control plane nodes experienced hardware failure, replace them with new nodes. +Use machine configuration backup to re-create the nodes with the same secret material and control plane settings +to allow workers to join the recovered control plane. + +If a control plane node is healthy but `etcd` isn't, wipe the node's `EPHEMERAL` partition to remove the `etcd` +data directory (make sure a database snapshot is taken before doing this): + +```bash +talosctl -n reset --graceful=false --reboot --system-labels-to-wipe=EPHEMERAL +``` + +At this point, all control plane nodes should boot up, and `etcd` service should be in the `Preparing` state. + +Kubernetes control plane endpoint should be pointed to the new control plane nodes if there were +any changes to the node addresses. + +### Recovering from the Backup + +Make sure all `etcd` service instances are in `Preparing` state: + +```bash +$ talosctl -n service etcd +NODE 172.20.0.2 +ID etcd +STATE Preparing +HEALTH ? +EVENTS [Preparing]: Running pre state (17s ago) + [Waiting]: Waiting for service "cri" to be "up", time sync (18s ago) + [Waiting]: Waiting for service "cri" to be "up", service "networkd" to be "up", time sync (20s ago) +``` + +Execute the bootstrap command against any control plane node passing the path to the `etcd` database snapshot: + +```bash +$ talosctl -n bootstrap --recover-from=./db.snapshot +recovering from snapshot "./db.snapshot": hash c25fd181, revision 4193, total keys 1287, total size 3035136 +``` + +> Note: if database snapshot was copied out directly from the `etcd` data directory using `talosctl cp`, +> add flag `--recover-skip-hash-check` to skip integrity check on restore. + +Talos node should print matching information in the kernel log: + +```log +recovering etcd from snapshot: hash c25fd181, revision 4193, total keys 1287, total size 3035136 +{"level":"info","msg":"restoring snapshot","path":"/var/lib/etcd.snapshot","wal-dir":"/var/lib/etcd/member/wal","data-dir":"/var/lib/etcd","snap-dir":"/var/li} +{"level":"info","msg":"restored last compact revision","meta-bucket-name":"meta","meta-bucket-name-key":"finishedCompactRev","restored-compact-revision":3360} +{"level":"info","msg":"added member","cluster-id":"a3390e43eb5274e2","local-member-id":"0","added-peer-id":"eb4f6f534361855e","added-peer-peer-urls":["https:/} +{"level":"info","msg":"restored snapshot","path":"/var/lib/etcd.snapshot","wal-dir":"/var/lib/etcd/member/wal","data-dir":"/var/lib/etcd","snap-dir":"/var/lib/etcd/member/snap"} +``` + +Now `etcd` service should become healthy on the bootstrap node, Kubernetes control plane components +should start and control plane endpoint should become available. +Remaining control plane nodes join `etcd` cluster once control plane endpoint is up. + +## Single Control Plane Node Cluster + +This guide applies to the single control plane clusters as well. +In fact, it is much more important to take regular snapshots of the `etcd` database in single control plane node +case, as loss of the control plane node might render the whole cluster irrecoverable without a backup. diff --git a/website/content/docs/v0.12/Guides/disk-encryption.md b/website/content/docs/v0.12/Guides/disk-encryption.md new file mode 100644 index 0000000000..04b3fbfd8f --- /dev/null +++ b/website/content/docs/v0.12/Guides/disk-encryption.md @@ -0,0 +1,179 @@ +--- +title: "Disk Encryption" +description: "Guide on using system disk encryption" +--- + +It is possible to enable encryption for system disks at the OS level. +As of this writing, only STATE and EPHEMERAL partitions can be encrypted. +STATE contains the most sensitive node data: secrets and certs. +EPHEMERAL partition may contain some sensitive workload data. +Data is encrypted using LUKS2, which is provided by the Linux kernel modules and `cryptsetup` utility. +The operating system will run additional setup steps when encryption is enabled. + +If the disk encryption is enabled for the STATE partition, the system will: + +- Save STATE encryption config as JSON in the META partition. +- Before mounting the STATE partition, load encryption configs either from the machine config or from the META partition. + Note that the machine config is always preferred over the META one. +- Before mounting the STATE partition, format and encrypt it. + This occurs only if the STATE partition is empty and has no filesystem. + +If the disk encryption is enabled for the EPHEMERAL partition, the system will: + +- Get the encryption config from the machine config. +- Before mounting the EPHEMERAL partition, encrypt and format it. + This occurs only if the EPHEMERAL partition is empty and has no filesystem. + +## Configuration + +Right now this encryption is disabled by default. +To enable disk encryption you should modify the machine configuration with the following options: + +```yaml +machine: + ... + systemDiskEncryption: + ephemeral: + keys: + - nodeID: {} + slot: 0 + state: + keys: + - nodeID: {} + slot: 0 +``` + +### Encryption Keys + +> Note: What the LUKS2 docs call "keys" are, in reality, a passphrase. +> When this passphrase is added, LUKS2 runs argon2 to create an actual key from that passphrase. + +LUKS2 supports up to 32 encryption keys and it is possible to specify all of them in the machine configuration. +Talos always tries to sync the keys list defined in the machine config with the actual keys defined for the LUKS2 partition. +So if you update the keys list you should have at least one key that is not changed to be used for keys management. + +When you define a key you should specify the key kind and the `slot`: + +```yaml +machine: + ... + state: + keys: + - nodeID: {} # key kind + slot: 1 + + ephemeral: + keys: + - static: + passphrase: supersecret + slot: 0 +``` + +Take a note that key order does not play any role on which key slot is used. +Every key must always have a slot defined. + +### Encryption Key Kinds + +Talos supports two kinds of keys: + +- `nodeID` which is generated using the node UUID and the partition label (note that if the node UUID is not really random it will fail the entropy check). +- `static` which you define right in the configuration. + +> Note: Use static keys only if your STATE partition is encrypted and only for the EPHEMERAL partition. +> For the STATE partition it will be stored in the META partition, which is not encrypted. + +### Key Rotation + +It is necessary to do `talosctl apply-config` a couple of times to rotate keys, since there is a need to always maintain a single working key while changing the other keys around it. + +So, for example, first add a new key: + +```yaml +machine: + ... + ephemeral: + keys: + - static: + passphrase: oldkey + slot: 0 + - static: + passphrase: newkey + slot: 1 + ... +``` + +Run: + +```bash +talosctl apply-config -n -f config.yaml +``` + +Then remove the old key: + +```yaml +machine: + ... + ephemeral: + keys: + - static: + passphrase: newkey + slot: 1 + ... +``` + +Run: + +```bash +talosctl apply-config -n -f config.yaml +``` + +## Going from Unencrypted to Encrypted and Vice Versa + +### Ephemeral Partition + +There is no in-place encryption support for the partitions right now, so to avoid losing any data only empty partitions can be encrypted. + +As such, migration from unencrypted to encrypted needs some additional handling, especially around explicitly wiping partitions. + +- `apply-config` should be called with `--on-reboot` flag. +- Partition should be wiped after `apply-config`, but before the reboot. + +Edit your machine config and add the encryption configuration: + +```bash +vim config.yaml +``` + +Apply the configuration with `--on-reboot` flag: + +```bash +talosctl apply-config -f config.yaml -n --on-reboot +``` + +Wipe the partition you're going to encrypt: + +```bash +talosctl reset --system-labels-to-wipe EPHEMERAL -n --reboot=true +``` + +That's it! +After you run the last command, the partition will be wiped and the node will reboot. +During the next boot the system will encrypt the partition. + +### State Partition + +Calling wipe against the STATE partition will make the node lose the config, so the previous flow is not going to work. + +The flow should be to first wipe the STATE partition: + +```bash +talosctl reset --system-labels-to-wipe STATE -n --reboot=true +``` + +Node will enter into maintenance mode, then run `apply-config` with `--insecure` flag: + +```bash +talosctl apply-config --insecure -n -f config.yaml +``` + +After installation is complete the node should encrypt the STATE partition. diff --git a/website/content/docs/v0.12/Guides/editing-machine-configuration.md b/website/content/docs/v0.12/Guides/editing-machine-configuration.md new file mode 100644 index 0000000000..4eeba07c55 --- /dev/null +++ b/website/content/docs/v0.12/Guides/editing-machine-configuration.md @@ -0,0 +1,104 @@ +--- +title: "Editing Machine Configuration" +description: "How to edit and patch Talos machine configuration, with reboot, immediately, or stage update on reboot." +--- + +Talos node state is fully defined by [machine configuration](../../reference/configuration/). +Initial configuration is delivered to the node at bootstrap time, but configuration can be updated while the node is running. + +> Note: Be sure that config is persisted so that configuration updates are not overwritten on reboots. +> Configuration persistence was enabled by default since Talos 0.5 (`persist: true` in machine configuration). + +There are three `talosctl` commands which facilitate machine configuration updates: + +* `talosctl apply-config` to apply configuration from the file +* `talosctl edit machineconfig` to launch an editor with existing node configuration, make changes and apply configuration back +* `talosctl patch machineconfig` to apply automated machine configuration via JSON patch + +Each of these commands can operate in one of three modes: + +* apply change with a reboot (default): update configuration, reboot Talos node to apply configuration change +* apply change immediately (`--immediate` flag): change is applied immediately without a reboot, only `.cluster` sub-tree of the machine configuration can be updated in Talos 0.9 +* apply change on next reboot (`--on-reboot`): change is staged to be applied after a reboot, but node is not rebooted + +> Note: applying change on next reboot (`--on-reboot`) doesn't modify current node configuration, so next call to +> `talosctl edit machineconfig --on-reboot` will not see changes + +### `talosctl apply-config` + +This command is mostly used to submit initial machine configuration to the node (generated by `talosctl gen config`). +It can be used to apply new configuration from the file to the running node as well, but most of the time it's not convenient, as it doesn't operate on the current node machine configuration. + +Example: + +```bash +talosctl -n apply-config -f config.yaml +``` + +Command `apply-config` can also be invoked as `apply machineconfig`: + +```bash +talosctl -n apply machineconfig -f config.yaml +``` + +Applying machine configuration immediately (without a reboot): + +```bash +talosctl -n IP apply machineconfig -f config.yaml --immediate +``` + +### `taloctl edit machineconfig` + +Command `talosctl edit` loads current machine configuration from the node and launches configured editor to modify the config. +If config hasn't been changed in the editor (or if updated config is empty), update is not applied. + +> Note: Talos uses environment variables `TALOS_EDITOR`, `EDITOR` to pick up the editor preference. +> If environment variables are missing, `vi` editor is used by default. + +Example: + +```bash +talosctl -n edit machineconfig +``` + +Configuration can be edited for multiple nodes if multiple IP addresses are specified: + +```bash +talosctl -n ,,... edit machineconfig +``` + +Applying machine configuration change immediately (without a reboot): + +```bash +talosctl -n edit machineconfig --immediate +``` + +### `talosctl patch machineconfig` + +Command `talosctl patch` works similar to `talosctl edit` command - it loads current machine configuration, but instead of launching configured editor it applies [JSON patch](http://jsonpatch.com/) to the configuration and writes result back to the node. + +Example, updating kubelet version (with a reboot): + +```bash +$ talosctl -n patch machineconfig -p '[{"op": "replace", "path": "/machine/kubelet/image", "value": "ghcr.io/talos-systems/kubelet:v1.20.5"}]' +patched mc at the node +``` + +Updating kube-apiserver version in immediate mode (without a reboot): + +```bash +$ talosctl -n patch machineconfig --immediate -p '[{"op": "replace", "path": "/cluster/apiServer/image", "value": "k8s.gcr.io/kube-apiserver:v1.20.5"}]' +patched mc at the node +``` + +Patch might be applied to multiple nodes when multiple IPs are specified: + +```bash +taloctl -n ,,... patch machineconfig --immediate -p '[{...}]' +``` + +### Recovering from Node Boot Failures + +If a Talos node fails to boot because of wrong configuration (for example, control plane endpoint is incorrect), configuration can be updated to fix the issue. +If the boot sequence is still running, Talos might refuse applying config in default mode. +In that case `--on-reboot` mode can be used coupled with `talosctl reboot` command to trigger a reboot and apply configuration update. diff --git a/website/content/docs/v0.12/Guides/managing-pki.md b/website/content/docs/v0.12/Guides/managing-pki.md new file mode 100644 index 0000000000..a3f5f94d4d --- /dev/null +++ b/website/content/docs/v0.12/Guides/managing-pki.md @@ -0,0 +1,49 @@ +--- +title: "Managing PKI" +description: "" +--- + +## Generating an Administrator Key Pair + +In order to create a key pair, you will need the root CA. + +Save the the CA public key, and CA private key as `ca.crt`, and `ca.key` respectively. +Now, run the following commands to generate a certificate: + +```bash +talosctl gen key --name admin +talosctl gen csr --key admin.key --ip 127.0.0.1 +talosctl gen crt --ca ca --csr admin.csr --name admin +``` + +Now, base64 encode `admin.crt`, and `admin.key`: + +```bash +cat admin.crt | base64 +cat admin.key | base64 +``` + +You can now set the `crt` and `key` fields in the `talosconfig` to the base64 encoded strings. + +## Renewing an Expired Administrator Certificate + +In order to renew the certificate, you will need the root CA, and the admin private key. +The base64 encoded key can be found in any one of the control plane node's configuration file. +Where it is exactly will depend on the specific version of the configuration file you are using. + +Save the the CA public key, CA private key, and admin private key as `ca.crt`, `ca.key`, and `admin.key` respectively. +Now, run the following commands to generate a certificate: + +```bash +talosctl gen csr --key admin.key --ip 127.0.0.1 +talosctl gen crt --ca ca --csr admin.csr --name admin +``` + +You should see `admin.crt` in your current directory. +Now, base64 encode `admin.crt`: + +```bash +cat admin.crt | base64 +``` + +You can now set the certificate in the `talosconfig` to the base64 encoded string. diff --git a/website/content/docs/v0.12/Guides/rbac.md b/website/content/docs/v0.12/Guides/rbac.md new file mode 100644 index 0000000000..a3a48f2d59 --- /dev/null +++ b/website/content/docs/v0.12/Guides/rbac.md @@ -0,0 +1,50 @@ +--- +title: Role-based access control (RBAC) +--- + +Talos v0.11 introduced initial support for role-based access control (RBAC). +This guide will explain what that is and how to enable it without losing access to the cluster. + +## RBAC in Talos + +Talos uses certificates to authorize users. +The certificate subject's organization field is used to encode user roles. +There is a set of predefined roles that allow access to different [API methods](../../reference/api/): + +* `os:admin` grants access to all 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)): + +```sh +$ yq eval '.contexts[.context].crt' talosconfig | base64 -d | openssl x509 -noout -text + +Certificate: + Data: + [...] + Subject: O = os:reader + [...] +``` + +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. +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: + +```sh +talosctl config new --roles=os:reader reader +``` + +That command will create a new client configuration file `reader` with a new certificate with `os:reader` role. + +After that, RBAC should be enabled in the machine configuration: + +```yaml +machine: + features: + rbac: true +``` diff --git a/website/content/docs/v0.12/Guides/resetting-a-machine.md b/website/content/docs/v0.12/Guides/resetting-a-machine.md new file mode 100644 index 0000000000..41f0f82300 --- /dev/null +++ b/website/content/docs/v0.12/Guides/resetting-a-machine.md @@ -0,0 +1,22 @@ +--- +title: "Resetting a Machine" +description: "" +--- + +From time to time, it may be beneficial to reset a Talos machine to its "original" state. +Bear in mind that this is a destructive action for the given machine. +Doing this means removing the machine from Kubernetes, Etcd (if applicable), and clears any data on the machine that would normally persist a reboot. + +The API command for doing this is `talosctl reset`. +There are a couple of flags as part of this command: + +```bash +Flags: + --graceful if true, attempt to cordon/drain node and leave etcd (if applicable) (default true) + --reboot if true, reboot the node after resetting instead of shutting down +``` + +The `graceful` flag is especially important when considering HA vs. non-HA Talos clusters. +If the machine is part of an HA cluster, a normal, graceful reset should work just fine right out of the box as long as the cluster is in a good state. +However, if this is a single node cluster being used for testing purposes, a graceful reset is not an option since Etcd cannot be "left" if there is only a single member. +In this case, reset should be used with `--graceful=false` to skip performing checks that would normally block the reset. diff --git a/website/content/docs/v0.12/Guides/storage.md b/website/content/docs/v0.12/Guides/storage.md new file mode 100644 index 0000000000..7e53db95ec --- /dev/null +++ b/website/content/docs/v0.12/Guides/storage.md @@ -0,0 +1,220 @@ +--- +title: "Storage" +description: "" +--- + +In Kubernetes, using storage in the right way is well-facilitated by the API. +However, unless you are running in a major public cloud, that API may not be hooked up to anything. +This frequently sends users down a rabbit hole of researching all the various options for storage backends for their platform, for Kubernetes, and for their workloads. +There are a _lot_ of options out there, and it can be fairly bewildering. + +For Talos, we try to limit the options somewhat to make the decision-making easier. + +## Public Cloud + +If you are running on a major public cloud, use their block storage. +It is easy and automatic. + +## Storage Clusters + +Redundancy in storage is usually very important. +Scaling capabilities, reliability, speed, maintenance load, and ease of use are all factors you must consider when managing your own storage. + +Running a storage cluster can be a very good choice when managing your own storage, and there are two project we recommend, depending on your situation. + +If you need vast amounts of storage composed of more than a dozen or so disks, just use Rook to manage Ceph. +Also, if you need _both_ mount-once _and_ mount-many capabilities, Ceph is your answer. +Ceph also bundles in an S3-compatible object store. +The down side of Ceph is that there are a lot of moving parts. + +> Please note that _most_ people should _never_ use mount-many semantics. +> NFS is pervasive because it is old and easy, _not_ because it is a good idea. +> While it may seem like a convenience at first, there are all manner of locking, performance, change control, and reliability concerns inherent in _any_ mount-many situation, so we **strongly** recommend you avoid this method. + +If your storage needs are small enough to not need Ceph, use Mayastor. + +### Rook/Ceph + +[Ceph](https://ceph.io) is the grandfather of open source storage clusters. +It is big, has a lot of pieces, and will do just about anything. +It scales better than almost any other system out there, open source or proprietary, being able to easily add and remove storage over time with no downtime, safely and easily. +It comes bundled with RadosGW, an S3-compatible object store. +It comes with CephFS, a NFS-like clustered filesystem. +And of course, it comes with RBD, a block storage system. + +With the help of [Rook](https://rook.io), the vast majority of the complexity of Ceph is hidden away by a very robust operator, allowing you to control almost everything about your Ceph cluster from fairly simple Kubernetes CRDs. + +So if Ceph is so great, why not use it for everything? + +Ceph can be rather slow for small clusters. +It relies heavily on CPUs and massive parallelisation to provide good cluster performance, so if you don't have much of those dedicated to Ceph, it is not going to be well-optimised for you. +Also, if your cluster is small, just running Ceph may eat up a significant amount of the resources you have available. + +Troubleshooting Ceph can be difficult if you do not understand its architecture. +There are lots of acronyms and the documentation assumes a fair level of knowledge. +There are very good tools for inspection and debugging, but this is still frequently seen as a concern. + +### Mayastor + +[Mayastor](https://github.com/openebs/Mayastor) is an OpenEBS project built in Rust utilising the modern NVMEoF system. +(Despite the name, Mayastor does _not_ require you to have NVME drives.) +It is fast and lean but still cluster-oriented and cloud native. +Unlike most of the other OpenEBS project, it is _not_ built on the ancient iSCSI system. + +Unlike Ceph, Mayastor is _just_ a block store. +It focuses on block storage and does it well. +It is much less complicated to set up than Ceph, but you probably wouldn't want to use it for more than a few dozen disks. + +Mayastor is new, maybe _too_ new. +If you're looking for something well-tested and battle-hardened, this is not it. +If you're looking for something lean, future-oriented, and simpler than Ceph, it might be a great choice. + +### Video Walkthrough + +To see a live demo of this section, see the video below: + + + +### Prep Nodes + +Either during initial cluster creation or on running worker nodes, several machine config values should be edited. +This can be done with `talosctl edit machineconfig` or via config patches during `talosctl gen config`. + +- Under `/machine/sysctls`, add `vm.nr_hugepages: "512"` +- Under `/machine/kubelet/extraMounts`, add `/var/local` like so: + +```yaml +... +extraMounts: + - destination: /var/local + type: bind + source: /var/local + options: + - rbind + - rshared + - rw +... +``` + +- Either using `kubectl taint node` in a pre-existing cluster or by updating `/machine/kubelet/extraArgs` in machine config, add `openebs.io/engine=mayastor` as a node label. +If being done via machine config, `extraArgs` may look like: + +```yaml +... +extraArgs: + node-labels: openebs.io/engine=mayastor +... +``` + +### Deploy Mayastor + +Using the [Mayastor docs](https://mayastor.gitbook.io/introduction/quickstart/deploy-mayastor) as a reference, apply all YAML files necessary. +At the time of writing this looked like: + +```bash +kubectl create namespace mayastor + +kubectl apply -f https://raw.githubusercontent.com/openebs/Mayastor/master/deploy/moac-rbac.yaml + +kubectl apply -f https://raw.githubusercontent.com/openebs/Mayastor/master/deploy/nats-deployment.yaml + +kubectl apply -f https://raw.githubusercontent.com/openebs/Mayastor/master/csi/moac/crds/mayastorpool.yaml + +kubectl apply -f https://raw.githubusercontent.com/openebs/Mayastor/master/deploy/csi-daemonset.yaml + +kubectl apply -f https://raw.githubusercontent.com/openebs/Mayastor/master/deploy/moac-deployment.yaml + +kubectl apply -f https://raw.githubusercontent.com/openebs/Mayastor/master/deploy/mayastor-daemonset.yaml +``` + +### Create Pools + +Each "storage" node should have a "MayastorPool" that defines the local disks to use for storage. +These are later considered during scheduling and replication of data. +Create the pool by issuing the following, updating as necessary: + +```bash +cat < + +This guide is written as series of topics and detailed answers for each topic. +It starts with basics of control plane and goes into Talos specifics. + +This document mostly applies only to Talos 0.9 control plane based on static pods. +If Talos was upgraded from version 0.8, it might be still running self-hosted control plane, current status can +be checked with the command `talosctl get bootstrapstatus`: + +```bash +$ talosctl -n get bs +NODE NAMESPACE TYPE ID VERSION SELF HOSTED +172.20.0.2 runtime BootstrapStatus control-plane 1 false +``` + +In this guide we assume that Talos client config is available and Talos API access is available. +Kubernetes client configuration can be pulled from control plane nodes with `talosctl -n kubeconfig` +(this command works before Kubernetes is fully booted). + +### What is a control plane node? + +Talos nodes which have `.machine.type` of `init` and `controlplane` are control plane nodes. + +The only difference between `init` and `controlplane` nodes is that `init` node automatically +bootstraps a single-node `etcd` cluster on a first boot if the etcd data directory is empty. +A node with type `init` can be replaced with a `controlplane` node which is triggered to run etcd bootstrap +with `talosctl --nodes bootstrap` command. + +Use of `init` type nodes is discouraged, as it might lead to split-brain scenario if one node in +existing cluster is reinstalled while config type is still `init`. + +It is critical to make sure only one control plane runs in bootstrap mode (either with node type `init` or +via bootstrap API/`talosctl bootstrap`), as having more than node in bootstrap mode leads to split-brain +scenario (multiple etcd clusters are built instead of a single cluster). + +### What is special about control plane node? + +Control plane nodes in Talos run `etcd` which provides data store for Kubernetes and Kubernetes control plane +components (`kube-apiserver`, `kube-controller-manager` and `kube-scheduler`). + +Control plane nodes are tainted by default to prevent workloads from being scheduled to control plane nodes. + +### How many control plane nodes should be deployed? + +With a single control plane node, cluster is not HA: if that single node experiences hardware failure, cluster +control plane is broken and can't be recovered. +Single control plane node clusters are still used as test clusters and in edge deployments, but it should be noted that this setup is not HA. + +Number of control plane should be odd (1, 3, 5, ...), as with even number of nodes, etcd quorum doesn't tolerate +failures correctly: e.g. with 2 control plane nodes quorum is 2, so failure of any node breaks quorum, so this +setup is almost equivalent to single control plane node cluster. + +With three control plane nodes cluster can tolerate a failure of any single control plane node. +With five control plane nodes cluster can tolerate failure of any two control plane nodes. + +### What is control plane endpoint? + +Kubernetes requires having a control plane endpoint which points to any healthy API server running on a control plane node. +Control plane endpoint is specified as URL like `https://endpoint:6443/`. +At any point in time, even during failures control plane endpoint should point to a healthy API server instance. +As `kube-apiserver` runs with host network, control plane endpoint should point to one of the control plane node IPs: `node1:6443`, `node2:6443`, ... + +For single control plane node clusters, control plane endpoint might be `https://IP:6443/` or `https://DNS:6443/`, where `IP` is the IP of the control plane node and `DNS` points to `IP`. +DNS form of the endpoint allows to change the IP address of the control plane if that IP changes over time. + +For HA clusters, control plane can be implemented as: + +* TCP L7 loadbalancer with active health checks against port 6443 +* round-robin DNS with active health checks against port 6443 +* BGP anycast IP with health checks +* virtual shared L2 IP + + +It is critical that control plane endpoint works correctly during cluster bootstrap phase, as nodes discover +each other using control plane endpoint. + +### kubelet is not running on control plane node + +Service `kubelet` should be running on control plane node as soon as networking is configured: + +```bash +$ talosctl -n service kubelet +NODE 172.20.0.2 +ID kubelet +STATE Running +HEALTH OK +EVENTS [Running]: Health check successful (2m54s ago) + [Running]: Health check failed: Get "http://127.0.0.1:10248/healthz": dial tcp 127.0.0.1:10248: connect: connection refused (3m4s ago) + [Running]: Started task kubelet (PID 2334) for container kubelet (3m6s ago) + [Preparing]: Creating service runner (3m6s ago) + [Preparing]: Running pre state (3m15s ago) + [Waiting]: Waiting for service "timed" to be "up" (3m15s ago) + [Waiting]: Waiting for service "cri" to be "up", service "timed" to be "up" (3m16s ago) + [Waiting]: Waiting for service "cri" to be "up", service "networkd" to be "up", service "timed" to be "up" (3m18s ago) +``` + +If `kubelet` is not running, it might be caused by wrong configuration, check `kubelet` logs +with `talosctl logs`: + +```bash +$ talosctl -n logs kubelet +172.20.0.2: I0305 20:45:07.756948 2334 controller.go:101] kubelet config controller: starting controller +172.20.0.2: I0305 20:45:07.756995 2334 controller.go:267] kubelet config controller: ensuring filesystem is set up correctly +172.20.0.2: I0305 20:45:07.757000 2334 fsstore.go:59] kubelet config controller: initializing config checkpoints directory "/etc/kubernetes/kubelet/store" +``` + +### etcd is not running on bootstrap node + +`etcd` should be running on bootstrap node immediately (bootstrap node is either `init` node or `controlplane` node +after `talosctl bootstrap` command was issued). +When node boots for the first time, `etcd` data directory `/var/lib/etcd` directory is empty and Talos launches `etcd` in a mode to build the initial cluster of a single node. +At this time `/var/lib/etcd` directory becomes non-empty and `etcd` runs as usual. + +If `etcd` is not running, check service `etcd` state: + +```bash +$ talosctl -n service etcd +NODE 172.20.0.2 +ID etcd +STATE Running +HEALTH OK +EVENTS [Running]: Health check successful (3m21s ago) + [Running]: Started task etcd (PID 2343) for container etcd (3m26s ago) + [Preparing]: Creating service runner (3m26s ago) + [Preparing]: Running pre state (3m26s ago) + [Waiting]: Waiting for service "cri" to be "up", service "networkd" to be "up", service "timed" to be "up" (3m26s ago) +``` + +If service is stuck in `Preparing` state for bootstrap node, it might be related to slow network - at this stage +Talos pulls `etcd` image from the container registry. + +If `etcd` service is crashing and restarting, check service logs with `talosctl -n logs etcd`. +Most common reasons for crashes are: + +* wrong arguments passed via `extraArgs` in the configuration; +* booting Talos on non-empty disk with previous Talos installation, `/var/lib/etcd` contains data from old cluster. + +### etcd is not running on non-bootstrap control plane node + +Service `etcd` on non-bootstrap control plane node waits for Kubernetes to boot successfully on bootstrap node to find +other peers to build a cluster. +As soon as bootstrap node boots Kubernetes control plane components, and `kubectl get endpoints` returns IP of bootstrap control plane node, other control plane nodes will start joining the cluster followed by Kubernetes control plane components on each control plane node. + +### Kubernetes static pod definitions are not generated + +Talos should write down static pod definitions for the Kubernetes control plane: + +```bash +$ talosctl -n ls /etc/kubernetes/manifests +NODE NAME +172.20.0.2 . +172.20.0.2 talos-kube-apiserver.yaml +172.20.0.2 talos-kube-controller-manager.yaml +172.20.0.2 talos-kube-scheduler.yaml +``` + +If static pod definitions are not rendered, check `etcd` and `kubelet` service health (see above), +and controller runtime logs (`talosctl logs controller-runtime`). + +### Talos prints error `an error on the server ("") has prevented the request from succeeding` + +This is expected during initial cluster bootstrap and sometimes after a reboot: + +```bash +[ 70.093289] [talos] task labelNodeAsMaster (1/1): starting +[ 80.094038] [talos] retrying error: an error on the server ("") has prevented the request from succeeding (get nodes talos-default-master-1) +``` + +Initially `kube-apiserver` component is not running yet, and it takes some time before it becomes fully up +during bootstrap (image should be pulled from the Internet, etc.) +Once control plane endpoint is up Talos should proceed. + +If Talos doesn't proceed further, it might be a configuration issue. + +In any case, status of control plane components can be checked with `talosctl containers -k`: + +```bash +$ talosctl -n containers --kubernetes +NODE NAMESPACE ID IMAGE PID STATUS +172.20.0.2 k8s.io kube-system/kube-apiserver-talos-default-master-1 k8s.gcr.io/pause:3.2 2539 SANDBOX_READY +172.20.0.2 k8s.io └─ kube-system/kube-apiserver-talos-default-master-1:kube-apiserver k8s.gcr.io/kube-apiserver:v1.20.4 2572 CONTAINER_RUNNING +``` + +If `kube-apiserver` shows as `CONTAINER_EXITED`, it might have exited due to configuration error. +Logs can be checked with `taloctl logs --kubernetes` (or with `-k` as a shorthand): + +```bash +$ talosctl -n logs -k kube-system/kube-apiserver-talos-default-master-1:kube-apiserver +172.20.0.2: 2021-03-05T20:46:13.133902064Z stderr F 2021/03/05 20:46:13 Running command: +172.20.0.2: 2021-03-05T20:46:13.133933824Z stderr F Command env: (log-file=, also-stdout=false, redirect-stderr=true) +172.20.0.2: 2021-03-05T20:46:13.133938524Z stderr F Run from directory: +172.20.0.2: 2021-03-05T20:46:13.13394154Z stderr F Executable path: /usr/local/bin/kube-apiserver +... +``` + +### Talos prints error `nodes "talos-default-master-1" not found` + +This error means that `kube-apiserver` is up, and control plane endpoint is healthy, but `kubelet` hasn't got +its client certificate yet and wasn't able to register itself. + +For the `kubelet` to get its client certificate, following conditions should apply: + +* control plane endpoint is healthy (`kube-apiserver` is running) +* bootstrap manifests got successfully deployed (for CSR auto-approval) +* `kube-controller-manager` is running + +CSR state can be checked with `kubectl get csr`: + +```bash +$ kubectl get csr +NAME AGE SIGNERNAME REQUESTOR CONDITION +csr-jcn9j 14m kubernetes.io/kube-apiserver-client-kubelet system:bootstrap:q9pyzr Approved,Issued +csr-p6b9q 14m kubernetes.io/kube-apiserver-client-kubelet system:bootstrap:q9pyzr Approved,Issued +csr-sw6rm 14m kubernetes.io/kube-apiserver-client-kubelet system:bootstrap:q9pyzr Approved,Issued +csr-vlghg 14m kubernetes.io/kube-apiserver-client-kubelet system:bootstrap:q9pyzr Approved,Issued +``` + +### Talos prints error `node not ready` + +Node in Kubernetes is marked as `Ready` once CNI is up. +It takes a minute or two for the CNI images to be pulled and for the CNI to start. +If the node is stuck in this state for too long, check CNI pods and logs with `kubectl`, usually +CNI resources are created in `kube-system` namespace. +For example, for Talos default Flannel CNI: + +```bash +$ kubectl -n kube-system get pods +NAME READY STATUS RESTARTS AGE +... +kube-flannel-25drx 1/1 Running 0 23m +kube-flannel-8lmb6 1/1 Running 0 23m +kube-flannel-gl7nx 1/1 Running 0 23m +kube-flannel-jknt9 1/1 Running 0 23m +... +``` + +### Talos prints error `x509: certificate signed by unknown authority` + +Full error might look like: + +```bash +x509: certificate signed by unknown authority (possiby because of crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes" +``` + +Commonly, the control plane endpoint points to a different cluster, as the client certificate +generated by Talos doesn't match CA of the cluster at control plane endpoint. + +### etcd is running on bootstrap node, but stuck in `pre` state on non-bootstrap nodes + +Please see question `etcd is not running on non-bootstrap control plane node`. + +### Checking `kube-controller-manager` and `kube-scheduler` + +If control plane endpoint is up, status of the pods can be performed with `kubectl`: + +```bash +$ kubectl get pods -n kube-system -l k8s-app=kube-controller-manager +NAME READY STATUS RESTARTS AGE +kube-controller-manager-talos-default-master-1 1/1 Running 0 28m +kube-controller-manager-talos-default-master-2 1/1 Running 0 28m +kube-controller-manager-talos-default-master-3 1/1 Running 0 28m +``` + +If control plane endpoint is not up yet, container status can be queried with +`talosctl containers --kubernetes`: + +```bash +$ talosctl -n c -k +NODE NAMESPACE ID IMAGE PID STATUS +... +172.20.0.2 k8s.io kube-system/kube-controller-manager-talos-default-master-1 k8s.gcr.io/pause:3.2 2547 SANDBOX_READY +172.20.0.2 k8s.io └─ kube-system/kube-controller-manager-talos-default-master-1:kube-controller-manager k8s.gcr.io/kube-controller-manager:v1.20.4 2580 CONTAINER_RUNNING +172.20.0.2 k8s.io kube-system/kube-scheduler-talos-default-master-1 k8s.gcr.io/pause:3.2 2638 SANDBOX_READY +172.20.0.2 k8s.io └─ kube-system/kube-scheduler-talos-default-master-1:kube-scheduler k8s.gcr.io/kube-scheduler:v1.20.4 2670 CONTAINER_RUNNING +... +``` + +If some of the containers are not running, it could be that image is still being pulled. +Otherwise process might crashing, in that case logs can be checked with `talosctl logs --kubernetes `: + +```bash +$ talosctl -n logs -k kube-system/kube-controller-manager-talos-default-master-1:kube-controller-manager +172.20.0.3: 2021-03-09T13:59:34.291667526Z stderr F 2021/03/09 13:59:34 Running command: +172.20.0.3: 2021-03-09T13:59:34.291702262Z stderr F Command env: (log-file=, also-stdout=false, redirect-stderr=true) +172.20.0.3: 2021-03-09T13:59:34.291707121Z stderr F Run from directory: +172.20.0.3: 2021-03-09T13:59:34.291710908Z stderr F Executable path: /usr/local/bin/kube-controller-manager +172.20.0.3: 2021-03-09T13:59:34.291719163Z stderr F Args (comma-delimited): /usr/local/bin/kube-controller-manager,--allocate-node-cidrs=true,--cloud-provider=,--cluster-cidr=10.244.0.0/16,--service-cluster-ip-range=10.96.0.0/12,--cluster-signing-cert-file=/system/secrets/kubernetes/kube-controller-manager/ca.crt,--cluster-signing-key-file=/system/secrets/kubernetes/kube-controller-manager/ca.key,--configure-cloud-routes=false,--kubeconfig=/system/secrets/kubernetes/kube-controller-manager/kubeconfig,--leader-elect=true,--root-ca-file=/system/secrets/kubernetes/kube-controller-manager/ca.crt,--service-account-private-key-file=/system/secrets/kubernetes/kube-controller-manager/service-account.key,--profiling=false +172.20.0.3: 2021-03-09T13:59:34.293870359Z stderr F 2021/03/09 13:59:34 Now listening for interrupts +172.20.0.3: 2021-03-09T13:59:34.761113762Z stdout F I0309 13:59:34.760982 10 serving.go:331] Generated self-signed cert in-memory +... +``` + +### Checking controller runtime logs + +Talos runs a set of controllers which work on resources to build and support Kubernetes control plane. + +Some debugging information can be queried from the controller logs with `talosctl logs controller-runtime`: + +```bash +$ talosctl -n logs controller-runtime +172.20.0.2: 2021/03/09 13:57:11 secrets.EtcdController: controller starting +172.20.0.2: 2021/03/09 13:57:11 config.MachineTypeController: controller starting +172.20.0.2: 2021/03/09 13:57:11 k8s.ManifestApplyController: controller starting +172.20.0.2: 2021/03/09 13:57:11 v1alpha1.BootstrapStatusController: controller starting +172.20.0.2: 2021/03/09 13:57:11 v1alpha1.TimeStatusController: controller starting +... +``` + +Controllers run reconcile loop, so they might be starting, failing and restarting, that is expected behavior. +Things to look for: + +`v1alpha1.BootstrapStatusController: bootkube initialized status not found`: control plane is not self-hosted, running with static pods. + +`k8s.KubeletStaticPodController: writing static pod "/etc/kubernetes/manifests/talos-kube-apiserver.yaml"`: static pod definitions were rendered successfully. + +`k8s.ManifestApplyController: controller failed: error creating mapping for object /v1/Secret/bootstrap-token-q9pyzr: an error on the server ("") has prevented the request from succeeding`: control plane endpoint is not up yet, bootstrap manifests can't be injected, controller is going to retry. + +`k8s.KubeletStaticPodController: controller failed: error refreshing pod status: error fetching pod status: an error on the server ("Authorization error (user=apiserver-kubelet-client, verb=get, resource=nodes, subresource=proxy)") has prevented the request from succeeding`: kubelet hasn't been able to contact `kube-apiserver` yet to push pod status, controller +is going to retry. + +`k8s.ManifestApplyController: created rbac.authorization.k8s.io/v1/ClusterRole/psp:privileged`: one of the bootstrap manifests got successfully applied. + +`secrets.KubernetesController: controller failed: missing cluster.aggregatorCA secret`: Talos is running with 0.8 configuration, if the cluster was upgraded from 0.8, this is expected, and conversion process will fix machine config +automatically. +If this cluster was bootstrapped with version 0.9, machine configuration should be regenerated with 0.9 talosctl. + +If there are no new messages in `controller-runtime` log, it means that controllers finished reconciling successfully. + +### Checking static pod definitions + +Talos generates static pod definitions for `kube-apiserver`, `kube-controller-manager`, and `kube-scheduler` +components based on machine configuration. +These definitions can be checked as resources with `talosctl get staticpods`: + +```bash +$ talosctl -n get staticpods -o yaml +get staticpods -o yaml +node: 172.20.0.2 +metadata: + namespace: controlplane + type: StaticPods.kubernetes.talos.dev + id: kube-apiserver + version: 2 + phase: running + finalizers: + - k8s.StaticPodStatus("kube-apiserver") +spec: + apiVersion: v1 + kind: Pod + metadata: + annotations: + talos.dev/config-version: "1" + talos.dev/secrets-version: "1" + creationTimestamp: null + labels: + k8s-app: kube-apiserver + tier: control-plane + name: kube-apiserver + namespace: kube-system +... +``` + +Status of the static pods can queried with `talosctl get staticpodstatus`: + +```bash +$ talosctl -n get staticpodstatus +NODE NAMESPACE TYPE ID VERSION READY +172.20.0.2 controlplane StaticPodStatus kube-system/kube-apiserver-talos-default-master-1 1 True +172.20.0.2 controlplane StaticPodStatus kube-system/kube-controller-manager-talos-default-master-1 1 True +172.20.0.2 controlplane StaticPodStatus kube-system/kube-scheduler-talos-default-master-1 1 True +``` + +Most important status is `Ready` printed as last column, complete status can be fetched by adding `-o yaml` flag. + +### Checking bootstrap manifests + +As part of bootstrap process, Talos injects bootstrap manifests into Kubernetes API server. +There are two kinds of manifests: system manifests built-in into Talos and extra manifests downloaded (custom CNI, extra manifests in the machine config): + +```bash +$ talosctl -n get manifests +NODE NAMESPACE TYPE ID VERSION +172.20.0.2 controlplane Manifest 00-kubelet-bootstrapping-token 1 +172.20.0.2 controlplane Manifest 01-csr-approver-role-binding 1 +172.20.0.2 controlplane Manifest 01-csr-node-bootstrap 1 +172.20.0.2 controlplane Manifest 01-csr-renewal-role-binding 1 +172.20.0.2 controlplane Manifest 02-kube-system-sa-role-binding 1 +172.20.0.2 controlplane Manifest 03-default-pod-security-policy 1 +172.20.0.2 controlplane Manifest 05-https://docs.projectcalico.org/manifests/calico.yaml 1 +172.20.0.2 controlplane Manifest 10-kube-proxy 1 +172.20.0.2 controlplane Manifest 11-core-dns 1 +172.20.0.2 controlplane Manifest 11-core-dns-svc 1 +172.20.0.2 controlplane Manifest 11-kube-config-in-cluster 1 +``` + +Details of each manifests can be queried by adding `-o yaml`: + +```bash +$ talosctl -n get manifests 01-csr-approver-role-binding --namespace=controlplane -o yaml +node: 172.20.0.2 +metadata: + namespace: controlplane + type: Manifests.kubernetes.talos.dev + id: 01-csr-approver-role-binding + version: 1 + phase: running +spec: + - apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + metadata: + name: system-bootstrap-approve-node-client-csr + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:certificates.k8s.io:certificatesigningrequests:nodeclient + subjects: + - apiGroup: rbac.authorization.k8s.io + kind: Group + name: system:bootstrappers +``` + +### Worker node is stuck with `apid` health check failures + +Control plane nodes have enough secret material to generate `apid` server certificates, but worker nodes +depend on control plane `trustd` services to generate certificates. +Worker nodes wait for `kubelet` to join the cluster, then `apid` queries Kubernetes endpoints via control plane +endpoint to find `trustd` endpoints, and use `trustd` to issue the certficiate. + +So if `apid` health checks is failing on worker node: + +* make sure control plane endpoint is healthy +* check that worker node `kubelet` joined the cluster diff --git a/website/content/docs/v0.12/Guides/upgrading-kubernetes.md b/website/content/docs/v0.12/Guides/upgrading-kubernetes.md new file mode 100644 index 0000000000..ee4a20d264 --- /dev/null +++ b/website/content/docs/v0.12/Guides/upgrading-kubernetes.md @@ -0,0 +1,281 @@ +--- +title: Upgrading Kubernetes +--- + +This guide covers Kubernetes control plane upgrade for clusters running Talos-managed control plane. +If the cluster is still running self-hosted control plane (after upgrade from Talos 0.8), please +refer to 0.8 docs. + +## Video Walkthrough + +To see a live demo of this writeup, see the video below: + + + +## Automated Kubernetes Upgrade + +To upgrade from Kubernetes v1.20.1 to v1.20.4 run: + +```bash +$ talosctl --nodes upgrade-k8s --from 1.20.1 --to 1.20.4 +discovered master nodes ["172.20.0.2" "172.20.0.3" "172.20.0.4"] +updating "kube-apiserver" to version "1.20.4" + > updating node "172.20.0.2" +2021/03/09 19:55:01 retrying error: config version mismatch: got "2", expected "3" + > updating node "172.20.0.3" +2021/03/09 19:55:05 retrying error: config version mismatch: got "2", expected "3" + > updating node "172.20.0.4" +2021/03/09 19:55:07 retrying error: config version mismatch: got "2", expected "3" +updating "kube-controller-manager" to version "1.20.4" + > updating node "172.20.0.2" +2021/03/09 19:55:27 retrying error: config version mismatch: got "2", expected "3" + > updating node "172.20.0.3" +2021/03/09 19:55:47 retrying error: config version mismatch: got "2", expected "3" + > updating node "172.20.0.4" +2021/03/09 19:56:07 retrying error: config version mismatch: got "2", expected "3" +updating "kube-scheduler" to version "1.20.4" + > updating node "172.20.0.2" +2021/03/09 19:56:27 retrying error: config version mismatch: got "2", expected "3" + > updating node "172.20.0.3" +2021/03/09 19:56:47 retrying error: config version mismatch: got "2", expected "3" + > updating node "172.20.0.4" +2021/03/09 19:57:08 retrying error: config version mismatch: got "2", expected "3" +updating daemonset "kube-proxy" to version "1.20.4" +``` + +Script runs in two phases: + +1. In the first phase every control plane node machine configuration is patched with new image version for each control plane component. + Talos renders new static pod definition on configuration update which is picked up by the kubelet. + Script waits for the change to propagate to the API server state. + Messages `config version mismatch` indicate that script is waiting for the updated container to be registered in the API server. +2. In the second phase script updates `kube-proxy` daemonset with the new image version. + +If script fails for any reason, it can be safely restarted to continue upgrade process. + +## Manual Kubernetes Upgrade + +Kubernetes can be upgraded manually as well by following the steps outlined below. +They are equivalent to the steps performed by the `talosctl upgrade-k8s` command. + +### Kubeconfig + +In order to edit the control plane, we will need a working `kubectl` config. +If you don't already have one, you can get one by running: + +```bash +talosctl --nodes kubeconfig +``` + +### API Server + +Patch machine configuration using `talosctl patch` command: + +```bash +$ talosctl -n patch mc --immediate -p '[{"op": "replace", "path": "/cluster/apiServer/image", "value": "k8s.gcr.io/kube-apiserver:v1.20.4"}]' +patched mc at the node 172.20.0.2 +``` + +JSON patch might need to be adjusted if current machine configuration is missing `.cluster.apiServer.image` key. + +Also machine configuration can be edited manually with `talosctl -n edit mc --immediate`. + +Capture new version of `kube-apiserver` config with: + +```bash +$ talosctl -n get kcpc kube-apiserver -o yaml +node: 172.20.0.2 +metadata: + namespace: config + type: KubernetesControlPlaneConfigs.config.talos.dev + id: kube-apiserver + version: 5 + phase: running +spec: + image: k8s.gcr.io/kube-apiserver:v1.20.4 + cloudProvider: "" + controlPlaneEndpoint: https://172.20.0.1:6443 + etcdServers: + - https://127.0.0.1:2379 + localPort: 6443 + serviceCIDR: 10.96.0.0/12 + extraArgs: {} + extraVolumes: [] +``` + +In this example, new version is `5`. +Wait for the new pod definition to propagate to the API server state (replace `talos-default-master-1` with the node name): + +```bash +$ kubectl get pod -n kube-system -l k8s-app=kube-apiserver --field-selector spec.nodeName=talos-default-master-1 -o jsonpath='{.items[0].metadata.annotations.talos\.dev/config\-version}' +5 +``` + +Check that the pod is running: + +```bash +$ kubectl get pod -n kube-system -l k8s-app=kube-apiserver --field-selector spec.nodeName=talos-default-master-1 +NAME READY STATUS RESTARTS AGE +kube-apiserver-talos-default-master-1 1/1 Running 0 16m +``` + +Repeat this process for every control plane node, verifying that state got propagated successfully between each node update. + +### Controller Manager + +Patch machine configuration using `talosctl patch` command: + +```bash +$ talosctl -n patch mc --immediate -p '[{"op": "replace", "path": "/cluster/controllerManager/image", "value": "k8s.gcr.io/kube-controller-manager:v1.20.4"}]' +patched mc at the node 172.20.0.2 +``` + +JSON patch might need be adjusted if current machine configuration is missing `.cluster.controllerManager.image` key. + +Capture new version of `kube-controller-manager` config with: + +```bash +$ talosctl -n get kcpc kube-controller-manager -o yaml +node: 172.20.0.2 +metadata: + namespace: config + type: KubernetesControlPlaneConfigs.config.talos.dev + id: kube-controller-manager + version: 3 + phase: running +spec: + image: k8s.gcr.io/kube-controller-manager:v1.20.4 + cloudProvider: "" + podCIDR: 10.244.0.0/16 + serviceCIDR: 10.96.0.0/12 + extraArgs: {} + extraVolumes: [] +``` + +In this example, new version is `3`. +Wait for the new pod definition to propagate to the API server state (replace `talos-default-master-1` with the node name): + +```bash +$ kubectl get pod -n kube-system -l k8s-app=kube-controller-manager --field-selector spec.nodeName=talos-default-master-1 -o jsonpath='{.items[0].metadata.annotations.talos\.dev/config\-version}' +3 +``` + +Check that the pod is running: + +```bash +$ kubectl get pod -n kube-system -l k8s-app=kube-controller-manager --field-selector spec.nodeName=talos-default-master-1 +NAME READY STATUS RESTARTS AGE +kube-controller-manager-talos-default-master-1 1/1 Running 0 35m +``` + +Repeat this process for every control plane node, verifying that state got propagated successfully between each node update. + +### Scheduler + +Patch machine configuration using `talosctl patch` command: + +```bash +$ talosctl -n patch mc --immediate -p '[{"op": "replace", "path": "/cluster/scheduler/image", "value": "k8s.gcr.io/kube-scheduler:v1.20.4"}]' +patched mc at the node 172.20.0.2 +``` + +JSON patch might need be adjusted if current machine configuration is missing `.cluster.scheduler.image` key. + +Capture new version of `kube-scheduler` config with: + +```bash +$ talosctl -n get kcpc kube-scheduler -o yaml +node: 172.20.0.2 +metadata: + namespace: config + type: KubernetesControlPlaneConfigs.config.talos.dev + id: kube-scheduler + version: 3 + phase: running +spec: + image: k8s.gcr.io/kube-scheduler:v1.20.4 + extraArgs: {} + extraVolumes: [] +``` + +In this example, new version is `3`. +Wait for the new pod definition to propagate to the API server state (replace `talos-default-master-1` with the node name): + +```bash +$ kubectl get pod -n kube-system -l k8s-app=kube-scheduler --field-selector spec.nodeName=talos-default-master-1 -o jsonpath='{.items[0].metadata.annotations.talos\.dev/config\-version}' +3 +``` + +Check that the pod is running: + +```bash +$ kubectl get pod -n kube-system -l k8s-app=kube-scheduler --field-selector spec.nodeName=talos-default-master-1 +NAME READY STATUS RESTARTS AGE +kube-scheduler-talos-default-master-1 1/1 Running 0 39m +``` + +Repeat this process for every control plane node, verifying that state got propagated successfully between each node update. + +### Proxy + +In the proxy's `DaemonSet`, change: + +```yaml +kind: DaemonSet +... +spec: + ... + template: + ... + spec: + containers: + - name: kube-proxy + image: k8s.gcr.io/kube-proxy:v1.20.1 + tolerations: + - ... +``` + +to: + +```yaml +kind: DaemonSet +... +spec: + ... + template: + ... + spec: + containers: + - name: kube-proxy + image: k8s.gcr.io/kube-proxy:v1.20.4 + tolerations: + - ... + - key: node-role.kubernetes.io/control-plane + operator: Exists + effect: NoSchedule +``` + +To edit the `DaemonSet`, run: + +```bash +kubectl edit daemonsets -n kube-system kube-proxy +``` + +## Kubelet + +Upgrading Kubelet version requires Talos node reboot after machine configuration change. + +For every node, patch machine configuration with new kubelet version, wait for the node to reboot: + +```bash +$ talosctl -n patch mc -p '[{"op": "replace", "path": "/machine/kubelet/image", "value": "ghcr.io/talos-systems/kubelet:v1.20.4"}]' +patched mc at the node 172.20.0.2 +``` + +Once node boots with the new configuration, confirm upgrade with `kubectl get nodes `: + +```bash +$ kubectl get nodes talos-default-master-1 +NAME STATUS ROLES AGE VERSION +talos-default-master-1 Ready control-plane,master 123m v1.20.4 +``` diff --git a/website/content/docs/v0.12/Guides/upgrading-talos.md b/website/content/docs/v0.12/Guides/upgrading-talos.md new file mode 100644 index 0000000000..9380383b78 --- /dev/null +++ b/website/content/docs/v0.12/Guides/upgrading-talos.md @@ -0,0 +1,67 @@ +--- +title: Upgrading Talos +--- + +Talos upgrades are effected by an API call. +The `talosctl` CLI utility will facilitate this. + + +## Video Walkthrough + +To see a live demo of this writeup, see the video below: + + + +## Upgrading from Talos 0.9 + +TBD + +### After Upgrade to 0.10 + +TBD + +### After Upgrade to 0.11 + +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 +as: + +```sh + $ talosctl upgrade --nodes 10.20.30.40 \ + --image ghcr.io/talos-systems/installer:v0.11.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. +In most cases, it is correct to just let Talos perform its default action. +However, if you are running a single-node control-plane, you will want to make sure that `--preserve=true`. + +If Talos fails to run the upgrade, the `--stage` flag may be used to perform the upgrade after a reboot +which is followed by another reboot to upgraded version. + + + +## Machine Configuration Changes + +TBD diff --git a/website/content/docs/v0.12/Guides/vip.md b/website/content/docs/v0.12/Guides/vip.md new file mode 100644 index 0000000000..12205537da --- /dev/null +++ b/website/content/docs/v0.12/Guides/vip.md @@ -0,0 +1,81 @@ +--- +title: Virtual (shared) IP +--- + +One of the biggest pain points when building a high-availability controlplane +is giving clients a single IP or URL at which they can reach any of the controlplane nodes. +The most common approaches all require external resources: reverse proxy, load +balancer, BGP, and DNS. + +Using a "Virtual" IP address, on the other hand, provides high availability +without external coordination or resources, so long as the controlplane members +share a layer 2 network. +In practical terms, this means that they are all connected via a switch, with no +router in between them. + +The term "virtual" is misleading here. +The IP address is real, and it is assigned to an interface. +Instead, what actually happens is that the controlplane machines vie for +control of the shared IP address. +There can be only one owner of the IP address at any given time, but if that +owner disappears or becomes non-responsive, another owner will be chosen, +and it will take up the mantle: the IP address. + +Talos has (as of version 0.9) built-in support for this form of shared IP address, +and it can utilize this for both the Kubernetes API server and the Talos endpoint set. +Talos uses `etcd` for elections and leadership (control) of the IP address. + +## Video Walkthrough + +To see a live demo of this writeup, see the video below: + + + +## Choose your Shared IP + +To begin with, you should choose your shared IP address. +It should generally be a reserved, unused IP address in the same subnet as +your controlplane nodes. +It should not be assigned or assignable by your DHCP server. + +For our example, we will assume that the controlplane nodes have the following +IP addresses: + +- `192.168.0.10` +- `192.168.0.11` +- `192.168.0.12` + +We then choose our shared IP to be: + +> 192.168.0.15 + +## Configure your Talos Machines + +The shared IP setting is only valid for controlplane nodes. + +For the example above, each of the controlplane nodes should have the following +Machine Config snippet: + +```yaml +machine: + network: + interfaces: + - interface: eth0 + dhcp: true + vip: + ip: 192.168.0.15 +``` + +Obviously, for your own environment, the interface and the DHCP setting may +differ. +You are free to use static addressing (`cidr`) instead of DHCP. + +## Caveats + +In general, the shared IP should just work. +However, since it relies on `etcd` for elections, the shared IP will not come +alive until after you have bootstrapped Kubernetes. +In general, this is not a problem, but it does mean that you cannot use the +shared IP when issuing the `talosctl bootstrap` command. +Instead, that command will need to target one of the controlplane nodes +discretely. diff --git a/website/content/docs/v0.12/Introduction/getting-started.md b/website/content/docs/v0.12/Introduction/getting-started.md new file mode 100644 index 0000000000..77a7e9aa6e --- /dev/null +++ b/website/content/docs/v0.12/Introduction/getting-started.md @@ -0,0 +1,460 @@ +--- +title: Getting Started +weight: 3 +--- + +This document will walk you through installing a full Talos Cluster. +You may wish to read through the [Quickstart](../quickstart/) first, to quickly create a local virtual cluster on your workstation. + +Regardless of where you run Talos, you will find that there is a pattern to deploying it. + +In general you will need to: + +- acquire the installation image +- decide on the endpoint for Kubernetes + - optionally create a load balancer +- configure Talos +- configure `talosctl` +- bootstrap Kubernetes + +## Prerequisites + +### `talosctl` + +The `talosctl` tool provides a CLI tool which interfaces with the Talos API in +an easy manner. +It also includes a number of useful tools for creating and managing your clusters. + +You should install `talosctl` before continuing: + +```bash +curl -Lo /usr/local/bin/talosctl https://github.com/talos-systems/talos/releases/latest/download/talosctl-$(uname -s | tr "[:upper:]" "[:lower:]")-amd64 +chmod +x /usr/local/bin/talosctl +``` + +## Acquire the installation image + +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) + +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) + +When booted from the ISO, Talos will run in RAM, and it will not install itself +until it is provided a configuration. +Thus, it is safe to boot the ISO onto any machine. + +### Alternative Booting + +If you wish to use a different boot mechanism (such as network boot or a custom ISO), there +are a number of required kernel parameters. + +Please see the [kernel](../../reference/kernel/) docs for more information. + +## Decide the Kubernetes Endpoint + +In order to configure Kubernetes and bootstrap the cluster, Talos needs to know +what the endpoint (DNS name or IP address) of the Kubernetes API Server will be. + +The endpoint should be the fully-qualified HTTP(S) URL for the Kubernetes API +Server, which (by default) runs on port 6443 using HTTPS. + +Thus, the format of the endpoint may be something like: + +- `https://192.168.0.10:6443` +- `https://kube.mycluster.mydomain.com:6443` +- `https://[2001:db8:1234::80]:6443` + +Because the Kubernetes controlplane is meant to be supplied in a high +availability manner, we must also choose how to bind it to the servers +themselves. +There are three common ways to do this. + +### Dedicated Load-balancer + +If you are using a cloud provider or have your own load-balancer available (such +as HAProxy, nginx reverse proxy, or an F5 load-balancer), using +a dedicated load balancer is a natural choice. +Just create an appropriate frontend matching the endpoint, and point the backends at each of the addresses of the Talos controlplane nodes. + +This is convenient if a load-balancer is available, but don't worry if that is +not the case. + +### Layer 2 Shared IP + +Talos has integrated support for serving Kubernetes from a shared (sometimes +called "virtual") IP address. +This method relies on OSI Layer 2 connectivity between controlplane Talos nodes. + +In this case, we may choose an IP address on the same subnet as the Talos +controlplane nodes which is not otherwise assigned to any machine. +For instance, if your controlplane node IPs are: + +- 192.168.0.10 +- 192.168.0.11 +- 192.168.0.12 + +You could choose the ip `192.168.0.15` as your shared IP address. +Just make sure that `192.168.0.15` is not used by any other machine and that your DHCP +will not serve it to any other machine. + +Once chosen, form the full HTTPS URL from this IP: + +```url +https://192.168.0.15:6443 +``` + +You are also free to set a DNS record to this IP address instead, but you will +still need to use the IP address to set up the shared IP +(`machine.network.interfaces[].vip.ip`) inside the Talos +configuration. + +For more information about using a shared IP, see the related +[Guide](../../guides/vip/) + +### DNS records + +If neither of the other methods work for you, you can instead use DNS records to +provide a measure of redundancy. +In this case, you would add multiple A or AAAA records for a DNS name. + +For instance, you could add: + +```dns +kube.cluster1.mydomain.com IN A 192.168.0.10 +kube.cluster1.mydomain.com IN A 192.168.0.11 +kube.cluster1.mydomain.com IN A 192.168.0.12 +``` + +Then, your endpoint would be: + +```url +https://kube.cluster1.mydomain.com:6443 +``` + +## Decide how to access the Talos API + +Since Talos is entirely API-driven, it is important to know how you are going to +access that API. +Talos comes with a number of mechanisms to make that easier. + +Controlplane nodes can proxy requests for worker nodes. +This means that you only need access to the controlplane nodes in order to access +the rest of the network. +This is useful for security (your worker nodes do not need to have +public IPs or be otherwise connected to the Internet), and it also makes working +with highly-variable clusters easier, since you only need to know the +controlplane nodes in advance. + +Even better, the `talosctl` tool will automatically load balance and fail over +between all of your controlplane nodes, so long as it is informed of each of the +controlplane node IPs. + +That does, of course, present the problem that you need to know how to talk to +the controlplane nodes. +In some environments, it is easy to be able to forecast, prescribe, or discover +the controlplane node IP addresses. +For others, though, even the controlplane nodes are dynamic, unpredictable, and +undiscoverable. + +The dynamic options above for the Kubernetes API endpoint also apply to the +Talos API endpoints. +The difference is that the Talos API runs on port `50000/tcp`. + +Whichever way you wish to access the Talos API, be sure to note the IP(s) or +hostname(s) so that you can configure your `talosctl` tool's `endpoints` below. + +## Configure Talos + +When Talos boots without a configuration, such as when using the Talos ISO, it +enters a limited maintenance mode and waits for a configuration to be provided. + +Alternatively, the Talos installer can be booted with the `talos.config` kernel +commandline argument set to an HTTP(s) URL from which it should receive its +configuration. +In cases where a PXE server can be available, this is much more efficient than +manually configuring each node. +If you do use this method, just note that Talos does require a number of other +kernel commandline parameters. +See the [required kernel parameters](../../reference/kernel/) for more information. + +In either case, we need to generate the configuration which is to be provided. +Luckily, the `talosctl` tool comes with a configuration generator for exactly +this purpose. + +```sh + talosctl gen config "cluster-name" "cluster-endpoint" +``` + +Here, `cluster-name` is an arbitrary name for the cluster which will be used +in your local client configuration as a label. +It does not affect anything in the cluster itself. +It is arbitrary, but it should be unique in the configuration on your local workstation. + +The `cluster-endpoint` is where you insert the Kubernetes Endpoint you +selected from above. +This is the Kubernetes API URL, and it should be a complete URL, with `https://` +and port, if not `443`. +The default port is `6443`, so the port is almost always required. + +When you run this command, you will receive a number of files in your current +directory: + +- `controlplane.yaml` +- `join.yaml` +- `talosconfig` + +The three `.yaml` files are what we call Machine Configs. +They are installed onto the Talos servers to act as their complete configuration, +describing everything from what disk Talos should be installed to, to what +sysctls to set, to what network settings it should have. +In the case of the `controlplane.yaml`, it even describes how Talos should form its Kubernetes cluster. + +The `talosconfig` file (which is also YAML) is your local client configuration +file. + +### Controlplane, Init, and Join + +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. + +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 main difference between Controlplane Machine Config files and Join Machine +Config files is that the former contains information about how to form the +Kubernetes cluster. + +### Templates + +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 +modifications need to be done. + +For instance, if you had three controlplane nodes and three worker nodes, you +may do something like this: + +```bash + for i in $(seq 0 2); do + cp controlplane.yaml cp$i.yaml + end + for i in $(seq 0 2); do + cp join.yaml w$i.yaml + end +``` + +In cases where there is no special configuration needed, you may use the same +file for each machine of the same type. + +### Apply Configuration + +After you have generated each machine's Machine Config, you need to load them +into the mahines themselves. +For that, you need to know their IP addresses. + +If you have access to the console or console logs of the machines, you can read +them to find the IP address(es). +Talos will print them out during the boot process: + +```log +[ 4.605369] [talos] task loadConfig (1/1): this machine is reachable at: +[ 4.607358] [talos] task loadConfig (1/1): 192.168.0.2 +[ 4.608766] [talos] task loadConfig (1/1): server certificate fingerprint: +[ 4.611106] [talos] task loadConfig (1/1): xA9a1t2dMxB0NJ0qH1pDzilWbA3+DK/DjVbFaJBYheE= +[ 4.613822] [talos] task loadConfig (1/1): +[ 4.614985] [talos] task loadConfig (1/1): upload configuration using talosctl: +[ 4.616978] [talos] task loadConfig (1/1): talosctl apply-config --insecure --nodes 192.168.0.2 --file +[ 4.620168] [talos] task loadConfig (1/1): or apply configuration using talosctl interactive installer: +[ 4.623046] [talos] task loadConfig (1/1): talosctl apply-config --insecure --nodes 192.168.0.2 --interactive +[ 4.626365] [talos] task loadConfig (1/1): optionally with node fingerprint check: +[ 4.628692] [talos] task loadConfig (1/1): talosctl apply-config --insecure --nodes 192.168.0.2 --cert-fingerprint 'xA9a1t2dMxB0NJ0qH1pDzilWbA3+DK/DjVbFaJBYheE=' --file +``` + +If you do not have console access, the IP address may also be discoverable from +your DHCP server. + +Once you have the IP address, you can then apply the correct configuration. + +```sh + talosctl apply-config --insecure \ + --nodes 192.168.0.2 \ + --file cp0.yaml +``` + +The insecure flag is necessary at this point because the PKI infrastructure has +not yet been made available to the node. +Note that the connection _will_ be encrypted, it is just unauthenticated. + +If you have console access, though, you can extract the server +certificate fingerprint and use it for an additional layer of validation: + +```sh + talosctl apply-config --insecure \ + --nodes 192.168.0.2 \ + --cert-fingerprint xA9a1t2dMxB0NJ0qH1pDzilWbA3+DK/DjVbFaJBYheE= \ + --file cp0.yaml +``` + +Using the fingerprint allows you to be sure you are sending the configuration to +the right machine, but it is completely optional. + +After the configuration is applied to a node, it will reboot. + +You may repeat this process for each of the nodes in your cluster. + +## Configure your talosctl client + +Now that the nodes are running Talos with its full PKI security suite, you need +to use that PKI to talk to the machines. +That means configuring your client, and that is what that `talosconfig` file is for. + +### Endpoints + +Endpoints are the communication endpoints to which the client directly talks. +These can be load balancers, DNS hostnames, a list of IPs, etc. +In general, it is recommended that these point to the set of control plane +nodes, either directly or through a reverse proxy or load balancer. + +Each endpoint will automatically proxy requests destined to another node through +it, so it is not necessary to change the endpoint configuration just because you +wish to talk to a different node within the cluster. + +Endpoints _do_, however, need to be members of the same Talos cluster as the +target node, because these proxied connections reply on certificate-based +authentication. + +We need to set the `endpoints` in your `talosconfig`. +`talosctl` will automatically load balance and fail over among the endpoints, +so no external load balancer or DNS abstraction is required +(though you are free to use them, if desired). + +As an example, if the IP addresses of our controlplane nodes are: + +- 192.168.0.2 +- 192.168.0.3 +- 192.168.0.4 + +We would set those in the `talosconfig` with: + +```sh + talosctl --talosconfig=./talosconfig \ + config endpoint 192.168.0.2 192.168.0.3 192.168.0.4 +``` + +### Nodes + +The node is the target node on which you wish to perform the API call. + +Keep in mind, when specifying nodes that their IPs and/or hostnames are as seen by the endpoint servers, not as from the client. +This is because all connections are proxied first through the endpoints. + +Some people also like to set a default set of nodes in the `talosconfig`. +This can be done in the same manner, replacing `endpoint` with `node`. +If you do this, however, know that you could easily reboot the wrong machine +by forgetting to declare the right one explicitly. +Worse, if you set several nodes as defaults, you could, with one `talosctl upgrade` +command upgrade your whole cluster all at the same time. +It's a powerful tool, and with that comes great responsibility. +The author of this document does not set a default node. + +You may simply provide `-n` or `--nodes` to any `talosctl` command to +supply the node or (comma-delimited) nodes on which you wish to perform the +operation. +Supplying the commandline parameter will override any default nodes +in the configuration file. + +To verify default node(s) you're currently configured to use, you can run: + +```bash +$ talosctl version +Client: + ... +Server: + NODE: + ... +``` + +For a more in-depth discussion of Endpoints and Nodes, please see +[talosctl](../../learn-more/talosctl/). + +### Default configuration file + +You _can_ reference which configuration file to use directly with the `--talosconfig` parameter: + +```sh + talosctl --talosconfig=./talosconfig \ + --nodes 192.168.0.2 version +``` + +However, `talosctl` comes with tooling to help you integrate and merge this +configuration into the default `talosctl` configuration file. +This is done with the `merge` option. + +```sh + talosctl config merge ./talosconfig +``` + +This will merge your new `talosconfig` into the default configuration file +(`$XDG_CONFIG_HOME/talos/config.yaml`), creating it if necessary. +Like Kubernetes, the `talosconfig` configuration files has multiple "contexts" +which correspond to multiple clusters. +The `` you chose above will be used as the context name. + +## Kubernetes Bootstrap + +All of your machines are configured, and your `talosctl` client is set up. +Now, you are ready to bootstrap your Kubernetes cluster. +If that sounds daunting, you haven't used Talos before. + +Bootstrapping your Kubernetes cluster with Talos is as simple as: + +```sh + talosctl bootstrap --nodes 192.168.0.2 +``` + +The IP there can be any of your controlplanes (or the loadbalancer, if you have +one). +It should only be issued once. + +At this point, Talos will form an `etcd` cluster, generate all of the core +Kubernetes assets, and start the Kubernetes controlplane components. + +After a few moments, you will be able to download your Kubernetes client +configuration and get started: + +```sh + talosctl kubeconfig +``` + +Running this command will add (merge) you new cluster into you local Kubernetes +configuration in the same way as `talosctl config merge` merged the Talos client +configuration into your local Talos client configuration file. + +If you would prefer for the configuration to _not_ be merged into your default +Kubernetes configuration file, simple tell it a filename: + +```sh + talosctl kubeconfig alternative-kubeconfig +``` + +If all goes well, you should now be able to connect to Kubernetes and see your +nodes: + +```sh + kubectl get nodes +``` diff --git a/website/content/docs/v0.12/Introduction/quickstart.md b/website/content/docs/v0.12/Introduction/quickstart.md new file mode 100644 index 0000000000..7b8bbb1e59 --- /dev/null +++ b/website/content/docs/v0.12/Introduction/quickstart.md @@ -0,0 +1,46 @@ +--- +title: Quickstart +weight: 2 +--- + +The easiest way to try Talos is by using the CLI (`talosctl`) to create a cluster on a machine with `docker` installed. + +## Prerequisites + +### `talosctl` + +Download `talosctl`: + +```bash +curl -Lo /usr/local/bin/talosctl https://github.com/talos-systems/talos/releases/latest/download/talosctl-$(uname -s | tr "[:upper:]" "[:lower:]")-amd64 +chmod +x /usr/local/bin/talosctl +``` + +### `kubectl` + +Download `kubectl` via one of methods outlined in the [documentation](https://kubernetes.io/docs/tasks/tools/install-kubectl/). + +## Create the Cluster + +Now run the following: + +```bash +talosctl cluster create +``` + +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 Talos (v0.11.0) containerd://1.4.3 +talos-default-worker-1 Ready 115s v1.20.2 10.5.0.3 Talos (v0.11.0) containerd://1.4.3 +``` + +## Destroy the Cluster + +When you are all done, remove the cluster: + +```bash +talosctl cluster destroy +``` diff --git a/website/content/docs/v0.12/Introduction/system-requirements.md b/website/content/docs/v0.12/Introduction/system-requirements.md new file mode 100644 index 0000000000..ee5cbe6df3 --- /dev/null +++ b/website/content/docs/v0.12/Introduction/system-requirements.md @@ -0,0 +1,54 @@ +--- +title: System Requirements +weight: 4 +--- + +## Minimum Requirements + + + + + + + + + + + + + + + + + + + + + +
RoleMemoryCores
Init/Control Plane2GB2
Worker1GB1
+ +## Recommended + + + + + + + + + + + + + + + + + + + + + +
RoleMemoryCores
Init/Control Plane4GB4
Worker2GB2
+ +These requirements are similar to that of kubernetes. diff --git a/website/content/docs/v0.12/Introduction/what-is-new.md b/website/content/docs/v0.12/Introduction/what-is-new.md new file mode 100644 index 0000000000..b746d86de9 --- /dev/null +++ b/website/content/docs/v0.12/Introduction/what-is-new.md @@ -0,0 +1,55 @@ +--- +title: What's New in Talos 0.10 +weight: 5 +--- + +## Disaster Recovery + +Talos now supports `etcd` [snapshots and recovery](../../guides/disaster-recovery/) from the snapshotted state. +Periodic snapshots of `etcd` data can be taken with `talosctl etcd snapshot` command, and in case of catastrophic control plane +failure `etcd` contents can be recovered from the latest snapshot with `talosctl bootstrap --recover-from=` command. + +## Time Synchronization + +The `timed` service was replaced with a new time sync controller without any machine configuration changes. +There should be no user-visible changes in the way new time synchronization process works, logs are now +available via `talosctl logs controller-runtime`. +Talos now prefers last successful time server (by IP address) on each sync attempt, which improves sync accuracy. + +## Single Board Computers + +Talos added support for the [Radxa Rock PI 4c](../../single-board-computers/rockpi_4/) board. +`u-boot` version was updated to fix the boot and USB issues on Raspberry Pi 4 8GiB version. + +## Optmizations + +Multiple optimizations were applied to reduce Talos `initramfs` size and memory footprint. +As a result, we see a reduction of memory usage of around 100 MiB for the core Talos components which leaves more resources available for you workloads. + +## Install Disk Selector + +Install section of the machine config now has `diskSelector` [field](../../reference/configuration/#installconfig) that allows querying install disk using the list of qualifiers: + +```yaml +... + install: + diskSelector: + size: >= 500GB + model: WDC* +... +``` + +`talosctl -n disks -i` can be used to check allowed disk qualifiers when the node is running in the maintenance mode. + +## Inline Kubernetes Manifests + +Kubernetes manifests can now be submitted in the machine configuration using the `cluster.inlineManifests` [field](../../reference/configuration/#clusterconfig), +which works same way as `cluster.extraManifests` field, but manifest contents are passed inline in the machine configuration. + +## Updated Components + +Linux: 5.10.19 -> 5.10.29 + +Kubernetes: 1.20.5 -> 1.21.0 + +Go: 1.15 -> 1.16 diff --git a/website/content/docs/v0.12/Introduction/what-is-talos.md b/website/content/docs/v0.12/Introduction/what-is-talos.md new file mode 100644 index 0000000000..7ba56ac431 --- /dev/null +++ b/website/content/docs/v0.12/Introduction/what-is-talos.md @@ -0,0 +1,27 @@ +--- +title: What is Talos? +weight: 1 +--- + +Talos is a container optimized Linux distro; a reimagining of Linux for distributed systems such as Kubernetes. +Designed to be as minimal as possible while still maintaining practicality. +For these reasons, Talos has a number of features unique to it: + +- it is immutable +- it is atomic +- it is ephemeral +- it is minimal +- it is secure by default +- it is managed via a single declarative configuration file and gRPC API + +Talos can be deployed on container, cloud, virtualized, and bare metal platforms. + +## Why Talos + +In having less, Talos offers more. +Security. +Efficiency. +Resiliency. +Consistency. + +All of these areas are improved simply by having less. diff --git a/website/content/docs/v0.12/Learn More/architecture.md b/website/content/docs/v0.12/Learn More/architecture.md new file mode 100644 index 0000000000..3c8a86a248 --- /dev/null +++ b/website/content/docs/v0.12/Learn More/architecture.md @@ -0,0 +1,41 @@ +--- +title: "Architecture" +weight: 3 +--- + +Talos is designed to be **atomic** in _deployment_ and **modular** in _composition_. + +It is atomic in the sense that the entirety of Talos is distributed as a +single, self-contained image, which is versioned, signed, and immutable. + +It is modular in the sense that it is composed of many separate components +which have clearly defined gRPC interfaces which facilitate internal flexibility +and external operational guarantees. + +There are a number of components which comprise Talos. +All of the main Talos components communicate with each other by gRPC, through a socket on the local machine. +This imposes a clear separation of concerns and ensures that changes over time which affect the interoperation of components are a part of the public git record. +The benefit is that each component may be iterated and changed as its needs dictate, so long as the external API is controlled. +This is a key component in reducing coupling and maintaining modularity. + +## The File System + +One of the more unique design decisions in Talos is the layout of the root file system. +There are three "layers" to the Talos root file system. +At its' core the rootfs is a read-only squashfs. +The squashfs is then mounted as a loop device into memory. +This provides Talos with an immutable base. + +The next layer is a set of `tmpfs` file systems for runtime specific needs. +Aside from the standard pseudo file systems such as `/dev`, `/proc`, `/run`, `/sys` and `/tmp`, a special `/system` is created for internal needs. +One reason for this is that we need special files such as `/etc/hosts`, and `/etc/resolv.conf` to be writable (remember that the rootfs is read-only). +For example, at boot Talos will write `/system/etc/hosts` and the bind mount it over `/etc/hosts`. +This means that instead of making all of `/etc` writable, Talos only makes very specific files writable under `/etc`. + +All files under `/system` are completely reproducible. +For files and directories that need to persist across boots, Talos creates `overlayfs` file systems. +The `/etc/kuberentes` is a good example of this. +Directories like this are `overlayfs` backed by an XFS file system mounted at `/var`. + +The `/var` directory is owned by Kubernetes with the exception of the above `overlayfs` file systems. +This directory is writable and used by `etcd` (in the case of control plane nodes), the kubelet, and the CRI (containerd). diff --git a/website/content/docs/v0.12/Learn More/components.md b/website/content/docs/v0.12/Learn More/components.md new file mode 100644 index 0000000000..eed0fdee7a --- /dev/null +++ b/website/content/docs/v0.12/Learn More/components.md @@ -0,0 +1,123 @@ +--- +title: "Components" +weight: 4 +--- + +In this section, we discuss the various components that underpin Talos. + +## Components + +| Component | Description | +| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| apid | When interacting with Talos, the gRPC API endpoint you interact with directly is provided by `apid`. `apid` acts as the gateway for all component interactions and forwards the requests to `machined`. | +| containerd | An industry-standard container runtime with an emphasis on simplicity, robustness, and portability. To learn more, see the [containerd website](https://containerd.io). | +| machined | Talos replacement for the traditional Linux init-process. Specially designed to run Kubernetes and does not allow starting arbitrary user services. | +| networkd | Handles all of the host level network configuration. The configuration is defined under the `networking` key | +| kernel | The Linux kernel included with Talos is configured according to the recommendations outlined in the [Kernel Self Protection Project](http://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project). | +| trustd | To run and operate a Kubernetes cluster, a certain level of trust is required. Based on the concept of a 'Root of Trust', `trustd` is a simple daemon responsible for establishing trust within the system. | +| udevd | Implementation of `eudev` into `machined`. `eudev` is Gentoo's fork of udev, systemd's device file manager for the Linux kernel. It manages device nodes in /dev and handles all user space actions when adding or removing devices. To learn more, see the [Gentoo Wiki](https://wiki.gentoo.org/wiki/Eudev). | + +### apid + +When interacting with Talos, the gRPC api endpoint you will interact with directly is `apid`. +Apid acts as the gateway for all component interactions. +Apid provides a mechanism to route requests to the appropriate destination when running on a control plane node. + +We'll use some examples below to illustrate what `apid` is doing. + +When a user wants to interact with a Talos component via `talosctl`, there are two flags that control the interaction with `apid`. +The `-e | --endpoints` flag specifies which Talos node ( via `apid` ) should handle the connection. +Typically this is a public-facing server. +The `-n | --nodes` flag specifies which Talos node(s) should respond to the request. +If `--nodes` is omitted, the first endpoint will be used. + +> Note: Typically, there will be an `endpoint` already defined in the Talos config file. +> Optionally, `nodes` can be included here as well. + +For example, if a user wants to interact with `machined`, a command like `talosctl -e cluster.talos.dev memory` may be used. + +```bash +$ talosctl -e cluster.talos.dev memory +NODE TOTAL USED FREE SHARED BUFFERS CACHE AVAILABLE +cluster.talos.dev 7938 1768 2390 145 53 3724 6571 +``` + +In this case, `talosctl` is interacting with `apid` running on `cluster.talos.dev` and forwarding the request to the `machined` api. + +If we wanted to extend our example to retrieve `memory` from another node in our cluster, we could use the command `talosctl -e cluster.talos.dev -n node02 memory`. + +```bash +$ talosctl -e cluster.talos.dev -n node02 memory +NODE TOTAL USED FREE SHARED BUFFERS CACHE AVAILABLE +node02 7938 1768 2390 145 53 3724 6571 +``` + +The `apid` instance on `cluster.talos.dev` receives the request and forwards it to `apid` running on `node02`, which forwards the request to the `machined` api. + +We can further extend our example to retrieve `memory` for all nodes in our cluster by appending additional `-n node` flags or using a comma separated list of nodes ( `-n node01,node02,node03` ): + +```bash +$ talosctl -e cluster.talos.dev -n node01 -n node02 -n node03 memory +NODE TOTAL USED FREE SHARED BUFFERS CACHE AVAILABLE +node01 7938 871 4071 137 49 2945 7042 +node02 257844 14408 190796 18138 49 52589 227492 +node03 257844 1830 255186 125 49 777 254556 +``` + +The `apid` instance on `cluster.talos.dev` receives the request and forwards it to `node01`, `node02`, and `node03`, which then forwards the request to their local `machined` api. + +### containerd + +[Containerd](https://github.com/containerd/containerd) provides the container runtime to launch workloads on Talos and Kubernetes. + +Talos services are namespaced under the `system` namespace in containerd, whereas the Kubernetes services are namespaced under the `k8s.io` namespace. + +### machined + +A common theme throughout the design of Talos is minimalism. +We believe strongly in the UNIX philosophy that each program should do one job well. +The `init` included in Talos is one example of this, and we are calling it "`machined`". + +We wanted to create a focused `init` that had one job - run Kubernetes. +To that extent, `machined` is relatively static in that it does not allow for arbitrary user-defined services. +Only the services necessary to run Kubernetes and manage the node are available. +This includes: + +- containerd +- [kubelet](https://kubernetes.io/docs/concepts/overview/components/) +- networkd +- trustd +- udevd + +### networkd + +Networkd handles all of the host level network configuration. +The configuration is defined under the `networking` key. + +By default, we attempt to issue a DHCP request for every interface on the server. +This can be overridden by supplying one of the following kernel arguments: + +- `talos.network.interface.ignore` - specify a list of interfaces to skip discovery on +- `ip` - `ip=:::::::::` as documented in the [kernel here](https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt) + - ex, `ip=10.0.0.99:::255.0.0.0:control-1:eth0:off:10.0.0.1` + +### kernel + +The Linux kernel included with Talos is configured according to the recommendations outlined in the Kernel Self Protection Project ([KSSP](http://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project)). + +### trustd + +Security is one of the highest priorities within Talos. +To run a Kubernetes cluster, a certain level of trust is required to operate a cluster. +For example, orchestrating the bootstrap of a highly available control plane requires sensitive PKI data distribution. + +To that end, we created `trustd`. +Based on a Root of Trust concept, `trustd` is a simple daemon responsible for establishing trust within the system. +Once trust is established, various methods become available to the trustee. +For example, it can accept a write request from another node to place a file on disk. + +Additional methods and capabilities will be added to the `trustd` component to support new functionality in the rest of the Talos environment. + +### udevd + +Udevd handles the kernel device notifications and sets up the necessary links in `/dev`. diff --git a/website/content/docs/v0.12/Learn More/concepts.md b/website/content/docs/v0.12/Learn More/concepts.md new file mode 100644 index 0000000000..04a7e129fa --- /dev/null +++ b/website/content/docs/v0.12/Learn More/concepts.md @@ -0,0 +1,12 @@ +--- +title: "Concepts" +weight: 2 +--- + +### Platform + +### Mode + +### Endpoint + +### Node diff --git a/website/content/docs/v0.12/Learn More/control-plane.md b/website/content/docs/v0.12/Learn More/control-plane.md new file mode 100644 index 0000000000..fa7ab6b810 --- /dev/null +++ b/website/content/docs/v0.12/Learn More/control-plane.md @@ -0,0 +1,67 @@ +--- +title: "Control Plane" +weight: 8 +--- + +This guide provides details on how Talos runs and bootstraps the Kubernetes control plane. + +### High-level Overview + +Talos cluster bootstrap flow: + +1. The `etcd` service is started on control plane nodes. + Instances of `etcd` on control plane nodes build the `etcd` cluster. +2. The `kubelet` service is started. +3. Control plane components are started as static pods via the `kubelet`, and the `kube-apiserver` component connects to the local (running on the same node) `etcd` instance. +4. The `kubelet` issues client certificate using the bootstrap token using the control plane endpoint (via `kube-apiserver` and `kube-controller-manager`). +5. The `kubelet` registers the node in the API server. +6. Kubernetes control plane schedules pods on the nodes. + +### Cluster Bootstrapping + +All nodes start the `kubelet` service. +The `kubelet` tries to contact the control plane endpoint, but as it is not up yet, it keeps retrying. + +One of the control plane nodes is chosen as the bootstrap node. +The node's type can be either `init` or `controlplane`, where the `controlplane` type is promoted using the bootstrap API (`talosctl bootstrap`). +The bootstrap node initiates the `etcd` bootstrap process by initializing `etcd` as the first member of the cluster. + +> Note: there should be only one bootstrap node for the cluster lifetime. +> Once `etcd` is bootstrapped, the bootstrap node has no special role and acts the same way as other control plane nodes. + +Services `etcd` on non-bootstrap nodes try to get `Endpoints` resource via control plane endpoint, but that request fails as control plane endpoint is not up yet. + +As soon as `etcd` is up on the bootstrap node, static pod definitions for the Kubernetes control plane components (`kube-apiserver`, `kube-controller-manager`, `kube-scheduler`) are rendered to disk. +The `kubelet` service on the bootstrap node picks up the static pod definitions and starts the Kubernetes control plane components. +As soon as `kube-apiserver` is launched, the control plane endpoint comes up. + +The bootstrap node acquires an `etcd` mutex and injects the bootstrap manifests into the API server. +The set of the bootstrap manifests specify the Kubernetes join token and kubelet CSR auto-approval. +The `kubelet` service on all the nodes is now able to issue client certificates for themselves and register nodes in the API server. + +Other bootstrap manifests specify additional resources critical for Kubernetes operations (i.e. CNI, PSP, etc.) + +The `etcd` service on non-bootstrap nodes is now able to discover other members of the `etcd` cluster via the Kubernetes `Endpoints` resource. +The `etcd` cluster is now formed and consists of all control plane nodes. + +All control plane nodes render static pod manifests for the control plane components. +Each node now runs a full set of components to make the control plane HA. + +The `kubelet` service on worker nodes is now able to issue the client certificate and register itself with the API server. + +### Scaling Up the Control Plane + +When new nodes are added to the control plane, the process is the same as the bootstrap process above: the `etcd` service discovers existing members of the control plane via the +control plane endpoint, joins the `etcd` cluster, and the control plane components are scheduled on the node. + +### Scaling Down the Control Plane + +Scaling down the control plane involves removing a node from the cluster. +The most critical part is making sure that the node which is being removed leaves the etcd cluster. +When using `talosctl reset` command, the targeted control plane node leaves the `etcd` cluster as part of the reset sequence. + +### Upgrading Control Plane Nodes + +When a control plane node is upgraded, Talos leaves `etcd`, wipes the system disk, installs a new version of itself, and reboots. +The upgraded node then joins the `etcd` cluster on reboot. +So upgrading a control plane node is equivalent to scaling down the control plane node followed by scaling up with a new version of Talos. diff --git a/website/content/docs/v0.12/Learn More/controllers-resources.md b/website/content/docs/v0.12/Learn More/controllers-resources.md new file mode 100644 index 0000000000..d46cfae4ed --- /dev/null +++ b/website/content/docs/v0.12/Learn More/controllers-resources.md @@ -0,0 +1,229 @@ +--- +title: "Controllers and Resources" +weight: 9 +--- + + + +Talos implements concepts of *resources* and *controllers* to facilitate internal operations of the operating system. +Talos resources and controllers are very similar to Kubernetes resources and controllers, but there are some differences. +The content of this document is not required to operate Talos, but it is useful for troubleshooting. + +Starting with Talos 0.9, most of the Kubernetes control plane boostrapping and operations is implemented via controllers and resources which allows Talos to be reactive to configuration changes, environment changes (e.g. time sync). + +## Resources + +A resource captures a piece of system state. +Each resource belongs to a "Type" which defines resource contents. +Resource state can be split in two parts: + +* metadata: fixed set of fields describing resource - namespace, type, ID, etc. +* spec: contents of the resource (depends on resource type). + +Resource is uniquely identified by (`namespace`, `type`, `id`). +Namespaces provide a way to avoid conflicts on duplicate resource IDs. + +At the moment of this writing, all resources are local to the node and stored in memory. +So on every reboot resource state is rebuilt from scratch (the only exception is `MachineConfig` resource which reflects current machine config). + +## Controllers + +Controllers run as independent lightweight threads in Talos. +The goal of the controller is to reconcile the state based on inputs and eventually update outputs. + +A controller can have any number of resource types (and namespaces) as inputs. +In other words, it watches specified resources for changes and reconciles when these changes occur. +A controller might also have additional inputs: running reconcile on schedule, watching `etcd` keys, etc. + +A controller has a single output: a set of resources of fixed type in a fixed namespace. +Only one controller can manage resource type in the namespace, so conflicts are avoided. + +## Querying Resources + +Talos CLI tool `talosctl` provides read-only access to the resource API which includes getting specific resource, +listing resources and watching for changes. + +Talos stores resources describing resource types and namespaces in `meta` namespace: + +```bash +$ talosctl get resourcedefinitions +NODE NAMESPACE TYPE ID VERSION +172.20.0.2 meta ResourceDefinition bootstrapstatuses.v1alpha1.talos.dev 1 +172.20.0.2 meta ResourceDefinition etcdsecrets.secrets.talos.dev 1 +172.20.0.2 meta ResourceDefinition kubernetescontrolplaneconfigs.config.talos.dev 1 +172.20.0.2 meta ResourceDefinition kubernetessecrets.secrets.talos.dev 1 +172.20.0.2 meta ResourceDefinition machineconfigs.config.talos.dev 1 +172.20.0.2 meta ResourceDefinition machinetypes.config.talos.dev 1 +172.20.0.2 meta ResourceDefinition manifests.kubernetes.talos.dev 1 +172.20.0.2 meta ResourceDefinition manifeststatuses.kubernetes.talos.dev 1 +172.20.0.2 meta ResourceDefinition namespaces.meta.cosi.dev 1 +172.20.0.2 meta ResourceDefinition resourcedefinitions.meta.cosi.dev 1 +172.20.0.2 meta ResourceDefinition rootsecrets.secrets.talos.dev 1 +172.20.0.2 meta ResourceDefinition secretstatuses.kubernetes.talos.dev 1 +172.20.0.2 meta ResourceDefinition services.v1alpha1.talos.dev 1 +172.20.0.2 meta ResourceDefinition staticpods.kubernetes.talos.dev 1 +172.20.0.2 meta ResourceDefinition staticpodstatuses.kubernetes.talos.dev 1 +172.20.0.2 meta ResourceDefinition timestatuses.v1alpha1.talos.dev 1 +``` + +```bash +$ talosctl get namespaces +NODE NAMESPACE TYPE ID VERSION +172.20.0.2 meta Namespace config 1 +172.20.0.2 meta Namespace controlplane 1 +172.20.0.2 meta Namespace meta 1 +172.20.0.2 meta Namespace runtime 1 +172.20.0.2 meta Namespace secrets 1 +``` + +Most of the time namespace flag (`--namespace`) can be omitted, as `ResourceDefinition` contains default +namespace which is used if no namespace is given: + +```bash +$ talosctl get resourcedefinitions resourcedefinitions.meta.cosi.dev -o yaml +node: 172.20.0.2 +metadata: + namespace: meta + type: ResourceDefinitions.meta.cosi.dev + id: resourcedefinitions.meta.cosi.dev + version: 1 + phase: running +spec: + type: ResourceDefinitions.meta.cosi.dev + displayType: ResourceDefinition + aliases: + - resourcedefinitions + - resourcedefinition + - resourcedefinitions.meta + - resourcedefinitions.meta.cosi + - rd + - rds + printColumns: [] + defaultNamespace: meta +``` + +Resource definition also contains type aliases which can be used interchangeably with canonical resource name: + +```bash +$ talosctl get ns config +NODE NAMESPACE TYPE ID VERSION +172.20.0.2 meta Namespace config 1 +``` + +### Output + +Command `talosctl get` supports following output modes: + +* `table` (default) prints resource list as a table +* `yaml` prints pretty formatted resources with details, including full metadata spec. + This format carries most details from the backend resource (e.g. comments in `MachineConfig` resource) +* `json` prints same information as `yaml`, some additional details (e.g. comments) might be lost. + This format is useful for automated processing with tools like `jq`. + +### Watching Changes + +If flag `--watch` is appended to the `talosctl get` command, the command switches to watch mode. +If list of resources was requested, `talosctl` prints initial contents of the list and then appends resource information for every change: + +```bash +$ talosctl get svc -w +NODE * NAMESPACE TYPE ID VERSION RUNNING HEALTHY +172.20.0.2 + runtime Service timed 2 true true +172.20.0.2 + runtime Service trustd 2 true true +172.20.0.2 + runtime Service udevd 2 true true +172.20.0.2 - runtime Service timed 2 true true +172.20.0.2 + runtime Service timed 1 true false +172.20.0.2 runtime Service timed 2 true true +``` + +Column `*` specifies event type: + +* `+` is created +* `-` is deleted +* ` ` is updated + +In YAML/JSON output, field `event` is added to the resource representation to describe the event type. + +### Examples + +Getting machine config: + +```bash +$ talosctl get machineconfig -o yaml +node: 172.20.0.2 +metadata: + namespace: config + type: MachineConfigs.config.talos.dev + id: v1alpha1 + version: 2 + phase: running +spec: + version: v1alpha1 # Indicates the schema used to decode the contents. + debug: false # Enable verbose logging to the console. + persist: true # Indicates whether to pull the machine config upon every boot. + # Provides machine specific configuration options. +... +``` + +Getting control plane static pod statuses: + +```bash +$ talosctl get staticpodstatus +NODE NAMESPACE TYPE ID VERSION READY +172.20.0.2 controlplane StaticPodStatus kube-system/kube-apiserver-talos-default-master-1 3 True +172.20.0.2 controlplane StaticPodStatus kube-system/kube-controller-manager-talos-default-master-1 3 True +172.20.0.2 controlplane StaticPodStatus kube-system/kube-scheduler-talos-default-master-1 4 True +``` + +Getting static pod definition for `kube-apiserver`: + +```bash +$ talosctl get sp kube-apiserver -n 172.20.0.2 -o yaml +node: 172.20.0.2 +metadata: + namespace: controlplane + type: StaticPods.kubernetes.talos.dev + id: kube-apiserver + version: 3 + phase: running + finalizers: + - k8s.StaticPodStatus("kube-apiserver") +spec: + apiVersion: v1 + kind: Pod + metadata: + annotations: + talos.dev/config-version: "1" + talos.dev/secrets-version: "2" +... +``` + +## Inspecting Controller Dependencies + +Talos can report current dependencies between controllers and resources for debugging purposes: + +```bash +$ talosctl inspect dependencies +digraph { + + n1[label="config.K8sControlPlaneController",shape="box"]; + n3[label="config.MachineTypeController",shape="box"]; + n2[fillcolor="azure2",label="config:KubernetesControlPlaneConfigs.config.talos.dev",shape="note",style="filled"]; +... +``` + +This outputs graph in `graphviz` format which can be rendered to PNG with command: + +```bash +talosctl inspect dependencies | dot -T png > deps.png +``` + +![Controller Dependencies](/images/controller-dependencies-v2.png) + +Graph can be enhanced by replacing resource types with actual resource instances: + +```bash +talosctl inspect dependencies --with-resources | dot -T png > deps.png +``` + +![Controller Dependencies with Resources](/images/controller-dependencies-with-resources-v2.png) diff --git a/website/content/docs/v0.12/Learn More/faqs.md b/website/content/docs/v0.12/Learn More/faqs.md new file mode 100644 index 0000000000..d797d9780b --- /dev/null +++ b/website/content/docs/v0.12/Learn More/faqs.md @@ -0,0 +1,31 @@ +--- +title: "FAQs" +weight: 6 +--- + + + +## How is Talos different from other container optimized Linux distros? + +Talos shares a lot of attributes with other distros, but there are some important differences. +Talos integrates tightly with Kubernetes, and is not meant to be a general-purpose operating system. +The most important difference is that Talos is fully controlled by an API via a gRPC interface, instead of an ordinary shell. +We don't ship SSH, and there is no console access. +Removing components such as these has allowed us to dramatically reduce the footprint of Talos, and in turn, improve a number of other areas like security, predictability, reliability, and consistency across platforms. +It's a big change from how operating systems have been managed in the past, but we believe that API-driven OSes are the future. + +## Why no shell or SSH? + +Since Talos is fully API-driven, all maintenance and debugging operations should be possible via the OS API. +We would like for Talos users to start thinking about what a "machine" is in the context of a Kubernetes cluster. +That is, that a Kubernetes _cluster_ can be thought of as one massive machine, and the _nodes_ are merely additional, undifferentiated resources. +We don't want humans to focus on the _nodes_, but rather on the _machine_ that is the Kubernetes cluster. +Should an issue arise at the node level, `talosctl` should provide the necessary tooling to assist in the identification, debugging, and remedation of the issue. +However, the API is based on the Principle of Least Privilege, and exposes only a limited set of methods. +We envision Talos being a great place for the application of [control theory](https://en.wikipedia.org/wiki/Control_theory) in order to provide a self-healing platform. + +## Why the name "Talos"? + +Talos was an automaton created by the Greek God of the forge to protect the island of Crete. +He would patrol the coast and enforce laws throughout the land. +We felt it was a fitting name for a security focused operating system designed to run Kubernetes. diff --git a/website/content/docs/v0.12/Learn More/networking-resources.md b/website/content/docs/v0.12/Learn More/networking-resources.md new file mode 100644 index 0000000000..f9e58a5499 --- /dev/null +++ b/website/content/docs/v0.12/Learn More/networking-resources.md @@ -0,0 +1,394 @@ +--- +title: "Networking Resources" +weight: 10 +--- + +Starting with version 0.11, a new implementation of the network configuration subsystem is powered by [COSI](../controllers-resources/). +The new implementation is still using the same machine configuration file format and external sources to configure a node's network, so there should be no difference +in the way Talos works in 0.11. + +The most notable change in Talos 0.11 is that all changes to machine configuration `.machine.network` can be applied now in immediate mode (without a reboot) via +`talosctl edit mc --immediate` or `talosctl apply-config --immediate`. + +## Resources + +There are six basic network configuration items in Talos: + +* `Address` (IP address assigned to the interface/link); +* `Route` (route to a destination); +* `Link` (network interface/link configuration); +* `Resolver` (list of DNS servers); +* `Hostname` (node hostname and domainname); +* `TimeServer` (list of NTP servers). + +Each network configuration item has two counterparts: + +* `*Status` (e.g. `LinkStatus`) describes the current state of the system (Linux kernel state); +* `*Spec` (e.g. `LinkSpec`) defines the desired configuration. + +| Resource | Status | Spec | +|--------------------|------------------------|----------------------| +| `Address` | `AddressStatus` | `AddressSpec` | +| `Route` | `RouteStatus` | `RouteSpec` | +| `Link` | `LinkStatus` | `LinkSpec` | +| `Resolver` | `ResolverStatus` | `ResolverSpec` | +| `Hostname` | `HostnameStatus` | `HostnameSpec` | +| `TimeServer` | `TimeServerStatus` | `TimeServerSpec` | + +Status resources have aliases with the `Status` suffix removed, so for example +`AddressStatus` is also available as `Address`. + +Talos networking controllers reconcile the state so that `*Status` equals the desired `*Spec`. + +## Observing State + +The current network configuration state can be observed by querying `*Status` resources via +`talosctl`: + +```sh +$ talosctl get addresses +NODE NAMESPACE TYPE ID VERSION ADDRESS LINK +172.20.0.2 network AddressStatus eth0/172.20.0.2/24 1 172.20.0.2/24 eth0 +172.20.0.2 network AddressStatus eth0/fe80::9804:17ff:fe9d:3058/64 2 fe80::9804:17ff:fe9d:3058/64 eth0 +172.20.0.2 network AddressStatus flannel.1/10.244.4.0/32 1 10.244.4.0/32 flannel.1 +172.20.0.2 network AddressStatus flannel.1/fe80::10b5:44ff:fe62:6fb8/64 2 fe80::10b5:44ff:fe62:6fb8/64 flannel.1 +172.20.0.2 network AddressStatus lo/127.0.0.1/8 1 127.0.0.1/8 lo +172.20.0.2 network AddressStatus lo/::1/128 1 ::1/128 lo +``` + +In the output there are addresses set up by Talos (e.g. `eth0/172.20.0.2/24`) and +addresses set up by other facilities (e.g. `flannel.1/10.244.4.0/32` set up by CNI). + +Talos networking controllers watch the kernel state and update resources +accordingly. + +Additional details about the address can be accessed via the YAML output: + +```sh +$ talosctl get address eth0/172.20.0.2/24 -o yaml +node: 172.20.0.2 +metadata: + namespace: network + type: AddressStatuses.net.talos.dev + id: eth0/172.20.0.2/24 + version: 1 + owner: network.AddressStatusController + phase: running + created: 2021-06-29T20:23:18Z + updated: 2021-06-29T20:23:18Z +spec: + address: 172.20.0.2/24 + local: 172.20.0.2 + broadcast: 172.20.0.255 + linkIndex: 4 + linkName: eth0 + family: inet4 + scope: global + flags: permanent +``` + +Resources can be watched for changes with the `--watch` flag to see how configuration changes over time. + +Other networking status resources can be inspected with `talosctl get routes`, `talosctl get links`, etc. +For example: + +```sh +$ talosctl get resolvers +NODE NAMESPACE TYPE ID VERSION RESOLVERS +172.20.0.2 network ResolverStatus resolvers 2 ["8.8.8.8","1.1.1.1"] +``` + +## Inspecting Configuration + +The desired networking configuration is combined from multiple sources and presented +as `*Spec` resources: + +```sh +$ talosctl get addressspecs +NODE NAMESPACE TYPE ID VERSION +172.20.0.2 network AddressSpec eth0/172.20.0.2/24 2 +172.20.0.2 network AddressSpec lo/127.0.0.1/8 2 +172.20.0.2 network AddressSpec lo/::1/128 2 +``` + +These `AddressSpecs` are applied to the Linux kernel to reach the desired state. +If, for example, an `AddressSpec` is removed, the address is removed from the Linux network interface as well. + +`*Spec` resources can't be manipulated directly, they are generated automatically by Talos +from multiple configuration sources (see a section below for details). + +If a `*Spec` resource is queried in YAML format, some additional information is available: + +```sh +$ talosctl get addressspecs eth0/172.20.0.2/24 -o yaml +node: 172.20.0.2 +metadata: + namespace: network + type: AddressSpecs.net.talos.dev + id: eth0/172.20.0.2/24 + version: 2 + owner: network.AddressMergeController + phase: running + created: 2021-06-29T20:23:18Z + updated: 2021-06-29T20:23:18Z + finalizers: + - network.AddressSpecController +spec: + address: 172.20.0.2/24 + linkName: eth0 + family: inet4 + scope: global + flags: permanent + layer: operator +``` + +An important field is the `layer` field, which describes a configuration layer this spec is coming from: in this case, it's generated by a network operator (see below) and is set by the DHCPv4 operator. + +## Configuration Merging + +Spec resources described in the previous section show the final merged configuration state, +while initial specs are put to a different unmerged namespace `network-config`. +Spec resources in the `network-config` namespace are merged with conflict resolution to produce the final merged representation in the `network` namespace. + +Let's take `HostnameSpec` as an example. +The final merged representation is: + +```sh +$ talosctl get hostnamespec -o yaml +node: 172.20.0.2 +metadata: + namespace: network + type: HostnameSpecs.net.talos.dev + id: hostname + version: 2 + owner: network.HostnameMergeController + phase: running + created: 2021-06-29T20:23:18Z + updated: 2021-06-29T20:23:18Z + finalizers: + - network.HostnameSpecController +spec: + hostname: talos-default-master-1 + domainname: "" + layer: operator +``` + +We can see that the final configuration for the hostname is `talos-default-master-1`. +And this is the hostname that was actually applied. +This can be verified by querying a `HostnameStatus` resource: + +```sh +$ talosctl get hostnamestatus +NODE NAMESPACE TYPE ID VERSION HOSTNAME DOMAINNAME +172.20.0.2 network HostnameStatus hostname 1 talos-default-master-1 +``` + +Initial configuration for the hostname in the `network-config` namespace is: + +```sh +$ talosctl get hostnamespec -o yaml --namespace network-config +node: 172.20.0.2 +metadata: + namespace: network-config + type: HostnameSpecs.net.talos.dev + id: default/hostname + version: 2 + owner: network.HostnameConfigController + phase: running + created: 2021-06-29T20:23:18Z + updated: 2021-06-29T20:23:18Z +spec: + hostname: talos-172-20-0-2 + domainname: "" + layer: default +--- +node: 172.20.0.2 +metadata: + namespace: network-config + type: HostnameSpecs.net.talos.dev + id: dhcp4/eth0/hostname + version: 1 + owner: network.OperatorSpecController + phase: running + created: 2021-06-29T20:23:18Z + updated: 2021-06-29T20:23:18Z +spec: + hostname: talos-default-master-1 + domainname: "" + layer: operator +``` + +We can see that there are two specs for the hostname: + +* one from the `default` configuration layer which defines the hostname as `talos-172-20-0-2` (default driven by the default node address); +* another one from the layer `operator` that defines the hostname as `talos-default-master-1` (DHCP). + +Talos merges these two specs into a final `HostnameSpec` based on the configuration layer and merge rules. +Here is the order of precedence from low to high: + +* `default` (defaults provided by Talos); +* `cmdline` (from the kernel command line); +* `platform` (driven by the cloud provider); +* `operator` (various dynamic configuration options: DHCP, Virtual IP, etc); +* `configuration` (derived from the machine configuration). + +So in our example the `operator` layer `HostnameSpec` overwrites the `default` layer producing the final hostname `talos-default-master-1`. + +The merge process applies to all six core networking specs. +For each spec, the `layer` controls the merge behavior +If multiple configuration specs +appear at the same layer, they can be merged together if possible, otherwise merge result +is stable but not defined (e.g. if DHCP on multiple interfaces provides two different hostnames for the node). + +`LinkSpecs` are merged across layers, so for example, machine configuration for the interface MTU overrides an MTU set by the DHCP server. + +## Network Operators + +Network operators provide dynamic network configuration which can change over time as the node is running: + +* DHCPv4 +* DHCPv6 +* Virtual IP + +Network operators produce specs for addresses, routes, links, etc., which are then merged and applied according to the rules described above. + +Operators are configured with `OperatorSpec` resources which describe when operators +should run and additional configuration for the operator: + +```sh +$ talosctl get operatorspecs -o yaml +node: 172.20.0.2 +metadata: + namespace: network + type: OperatorSpecs.net.talos.dev + id: dhcp4/eth0 + version: 1 + owner: network.OperatorConfigController + phase: running + created: 2021-06-29T20:23:18Z + updated: 2021-06-29T20:23:18Z +spec: + operator: dhcp4 + linkName: eth0 + requireUp: true + dhcp4: + routeMetric: 1024 +``` + +`OperatorSpec` resources are generated by Talos based on machine configuration mostly. +DHCP4 operator is created automatically for all physical network links which are not configured explicitly via the kernel command line or the machine configuration. +This also means that on the first boot, without a machine configuration, a DHCP request is made on all physical network interfaces by default. + +Specs generated by operators are prefixed with the operator ID (`dhcp4/eth0` in the example above) in the unmerged `network-config` namespace: + +```sh +$ talosctl -n 172.20.0.2 get addressspecs --namespace network-config +NODE NAMESPACE TYPE ID VERSION +172.20.0.2 network-config AddressSpec dhcp4/eth0/eth0/172.20.0.2/24 1 +``` + +## Other Network Resources + +There are some additional resources describing the network subsystem state. + +The `NodeAddress` resource presents node addresses excluding link-local and loopback addresses: + +```sh +$ talosctl get nodeaddresses +NODE NAMESPACE TYPE ID VERSION ADDRESSES +10.100.2.23 network NodeAddress accumulative 6 ["10.100.2.23","147.75.98.173","147.75.195.143","192.168.95.64","2604:1380:1:ca00::17"] +10.100.2.23 network NodeAddress current 5 ["10.100.2.23","147.75.98.173","192.168.95.64","2604:1380:1:ca00::17"] +10.100.2.23 network NodeAddress default 1 ["10.100.2.23"] +``` + +* `default` is the node default address; +* `current` is the set of addresses a node currently has; +* `accumulative` is the set of addresses a node had over time (it might include virtual IPs which are not owned by the node at the moment). + +`NodeAddress` resources are used to pick up the default address for `etcd` peer URL, to populate SANs field in the generated certificates, etc. + +Another important resource is `Nodename` which provides `Node` name in Kubernetes: + +```sh +$ talosctl get nodename +NODE NAMESPACE TYPE ID VERSION NODENAME +10.100.2.23 controlplane Nodename nodename 1 infra-green-cp-mmf7v +``` + +Depending on the machine configuration `nodename` might be just a hostname or the FQDN of the node. + +`NetworkStatus` aggregates the current state of the network configuration: + +```sh +$ talosctl get networkstatus -o yaml +node: 10.100.2.23 +metadata: + namespace: network + type: NetworkStatuses.net.talos.dev + id: status + version: 5 + owner: network.StatusController + phase: running + created: 2021-06-24T18:56:00Z + updated: 2021-06-24T18:56:02Z +spec: + addressReady: true + connectivityReady: true + hostnameReady: true + etcFilesReady: true +``` + +## Network Controllers + +For each of the six basic resource types, there are several controllers: + +* `*StatusController` populates `*Status` resources observing the Linux kernel state. +* `*ConfigController` produces the initial unmerged `*Spec` resources in the `network-config` namespace based on defaults, kernel command line, and machine configuration. +* `*MergeController` merges `*Spec` resources into the final representation in the `network` namespace. +* `*SpecController` applies merged `*Spec` resources to the kernel state. + +For the network operators: + +* `OperatorConfigController` produces `OperatorSpec` resources based on machine configuration and deafauls. +* `OperatorSpecController` runs network operators watching `OperatorSpec` resources and producing various `*Spec` resources in the `network-config` namespace. + +## Configuration Sources + +There are several configuration sources for the network configuration, which are described in this section. + +### Defaults + +* `lo` interface is assigned addresses `127.0.0.1/8` and `::1/128`; +* hostname is set to the `talos-` where `IP` is the default node address; +* resolvers are set to `8.8.8.8`, `1.1.1.1`; +* time servers are set to `pool.ntp.org`; +* DHCP4 operator is run on any physical interface which is not configured explicitly. + +### Cmdline + +The kernel command line is parsed for the following options: + +* `ip=` option is parsed for node IP, default gateway, hostname, DNS servers, NTP servers; +* `talos.hostname=` option is used to set node hostname; +* `talos.network.interface.ignore=` can be used to make Talos skip network interface configuration completely. + +### Platform + +Platform configuration delivers cloud environment-specific options (e.g. the hostname). + +### Operator + +Network operators provide configuration for all basic resource types. + +### Machine Configuration + +The machine configuration is parsed for link configuration, addresses, routes, hostname, +resolvers and time servers. +Any changes to `.machine.network` configuration can be applied in immediate mode. + +## Network Configuration Debugging + +Most of the network controller operations and failures are logged to the kernel console, +additional logs with `debug` level are available with `talosctl logs controller-runtime` command. +If the network configuration can't be established and the API is not available, `debug` level +logs can be sent to the console with `debug: true` option in the machine configuration. diff --git a/website/content/docs/v0.12/Learn More/philosophy.md b/website/content/docs/v0.12/Learn More/philosophy.md new file mode 100644 index 0000000000..a9c7dcebe0 --- /dev/null +++ b/website/content/docs/v0.12/Learn More/philosophy.md @@ -0,0 +1,72 @@ +--- +title: Philosophy +weight: 1 +--- + +## Distributed + +Talos is intended to be operated in a distributed manner. +That is, it is built for a high-availability dataplane _first_. +Its `etcd` cluster is built in an ad-hoc manner, with each appointed node joining on its own directive (with proper security validations enforced, of course). +Like as kubernetes itself, workloads are intended to be distributed across any number of compute nodes. + +There should be no single points of failure, and the level of required coordination is as low as each platform allows. + +## Immutable + +Talos takes immutability very seriously. +Talos itself, even when installed on a disk, always runs from a SquashFS image, meaning that even if a directory is mounted to be writable, the image itself is never modified. +All images are signed and delivered as single, versioned files. +We can always run integrity checks on our image to verify that it has not been modified. + +While Talos does allow a few, highly-controlled write points to the filesystem, we strive to make them as non-unique and non-critical as possible. +In fact, we call the writable partition the "ephemeral" partition precisely because we want to make sure none of us ever uses it for unique, non-replicated, non-recreatable data. +Thus, if all else fails, we can always wipe the disk and get back up and running. + +## Minimal + +We are always trying to reduce and keep small Talos' footprint. +Because nearly the entire OS is built from scratch in Go, we are already +starting out in a good position. +We have no shell. +We have no SSH. +We have none of the GNU utilities, not even a rollup tool such as busybox. +Everything which is included in Talos is there because it is necessary, and +nothing is included which isn't. + +As a result, the OS right now produces a SquashFS image size of less than **80 MB**. + +## Ephemeral + +Everything Talos writes to its disk is either replicated or reconstructable. +Since the controlplane is high availability, the loss of any node will cause +neither service disruption nor loss of data. +No writes are even allowed to the vast majority of the filesystem. +We even call the writable partition "ephemeral" to keep this idea always in +focus. + +## Secure + +Talos has always been designed with security in mind. +With its immutability, its minimalism, its signing, and its componenture, we are +able to simply bypass huge classes of vulnerabilities. +Moreover, because of the way we have designed Talos, we are able to take +advantage of a number of additional settings, such as the recommendations of the Kernel Self Protection Project (kspp) and the complete disablement of dynamic modules. + +There are no passwords in Talos. +All networked communication is encrypted and key-authenticated. +The Talos certificates are short-lived and automatically-rotating. +Kubernetes is always constructed with its own separate PKI structure which is +enforced. + +## Declarative + +Everything which can be configured in Talos is done so through a single YAML +manifest. +There is no scripting and no procedural steps. +Everything is defined by the one declarative YAML file. +This configuration includes that of both Talos itself and the Kubernetes which +it forms. + +This is achievable because Talos is tightly focused to do one thing: run +kubernetes, in the easiest, most secure, most reliable way it can. diff --git a/website/content/docs/v0.12/Learn More/talosctl.md b/website/content/docs/v0.12/Learn More/talosctl.md new file mode 100644 index 0000000000..7c465be577 --- /dev/null +++ b/website/content/docs/v0.12/Learn More/talosctl.md @@ -0,0 +1,62 @@ +--- +title: "talosctl" +weight: 7 +--- + +The `talosctl` tool packs a lot of power into a small package. +It acts as a reference implementation for the Talos API, but it also handles a lot of +conveniences for the use of Talos and its clusters. + +### Video Walkthrough + +To see some live examples of talosctl usage, view the following video: + + + +## Client Configuration + +Talosctl configuration is located in `$XDG_CONFIG_HOME/talos/config.yaml` if `$XDG_CONFIG_HOME` is defined. +Otherwise it is in `$HOME/.talos/config`. +The location can always be overridden by the `TALOSCONFIG` environment variable or the `--talosconfig` parameter. + +Like `kubectl`, `talosctl` uses the concept of configuration contexts, so any number of Talos clusters can be managed with a single configuration file. +Unlike `kubectl`, it also comes with some intelligent tooling to manage the merging of new contexts into the config. +The default operation is a non-destructive merge, where if a context of the same name already exists in the file, the context to be added is renamed by appending an index number. +You can easily overwrite instead, as well. +See the `talosctl config help` for more information. + +## Endpoints and Nodes + +![Endpoints and Nodes](/images/endpoints-and-nodes.png) + +The `endpoints` are the communication endpoints to which the client directly talks. +These can be load balancers, DNS hostnames, a list of IPs, etc. +Further, if multiple endpoints are specified, the client will automatically load +balance and fail over between them. +In general, it is recommended that these point to the set of control plane nodes, either directly or through a reverse proxy or load balancer. + +Each endpoint will automatically proxy requests destined to another node through it, so it is not necessary to change the endpoint configuration just because you wish to talk to a different node within the cluster. + +Endpoints _do_, however, need to be members of the same Talos cluster as the target node, because these proxied connections reply on certificate-based authentication. + +The `node` is the target node on which you wish to perform the API call. +While you can configure the target node (or even set of target nodes) inside the 'talosctl' configuration file, it is often useful to simply and explicitly declare the target node(s) using the `-n` or `--nodes` command-line parameter. + +Keep in mind, when specifying nodes that their IPs and/or hostnames are as seen by the endpoint servers, not as from the client. +This is because all connections are proxied first through the endpoints. + +## Kubeconfig + +The configuration for accessing a Talos Kubernetes cluster is obtained with `talosctl`. +By default, `talosctl` will safely merge the cluster into the default kubeconfig. +Like `talosctl` itself, in the event of a naming conflict, the new context name will be index-appended before insertion. +The `--force` option can be used to overwrite instead. + +You can also specify an alternate path by supplying it as a positional parameter. + +Thus, like Talos clusters themselves, `talosctl` makes it easy to manage any +number of kubernetes clusters from the same workstation. + +## Commands + +Please see the [CLI reference](../../reference/cli/) for the entire list of commands which are available from `talosctl`. diff --git a/website/content/docs/v0.12/Learn More/upgrades.md b/website/content/docs/v0.12/Learn More/upgrades.md new file mode 100644 index 0000000000..00c9571217 --- /dev/null +++ b/website/content/docs/v0.12/Learn More/upgrades.md @@ -0,0 +1,111 @@ +--- +title: Upgrades +weight: 5 +--- + +## Talos + +The upgrade process for Talos, like everything else, begins with an API call. +This call tells a node the installer image to use to perform the upgrade. +Each Talos version corresponds to an installer with the same version, such that the +version of the installer is the version of Talos which will be installed. + +Because Talos is image based, even at run-time, upgrading Talos is almost +exactly the same set of operations as installing Talos, with the difference that +the system has already been initialized with a configuration. + +An upgrade makes use of an A-B image scheme in order to facilitate rollbacks. +This scheme retains the one previous Talos kernel and OS image following each upgrade. +If an upgrade fails to boot, Talos will roll back to the previous version. +Likewise, Talos may be manually rolled back via API (or `talosctl rollback`). +This will simply update the boot reference and reboot. + +An upgrade can `preserve` data or not. +If Talos is told to NOT preserve data, it will wipe its ephemeral partition, remove itself from the etcd cluster (if it is a control node), and generally make itself as pristine as is possible. +There are likely to be changes to the default option here over time, so if your setup has a preference to one way or the other, it is better to specify it explicitly, but we try to always be "safe" with this setting. + +### Sequence + +When a Talos node receives the upgrade command, the first thing it does is cordon +itself in kubernetes, to avoid receiving any new workload. +It then starts to drain away its existing workload. + +**NOTE**: If any of your workloads is sensitive to being shut down ungracefully, be sure to use the `lifecycle.preStop` Pod [spec](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks). + +Once all of the workload Pods are drained, Talos will start shutting down its +internal processes. +If it is a control node, this will include etcd. +If `preserve` is not enabled, Talos will even leave etcd membership. +(Don't worry about this; we make sure the etcd cluster is healthy and that it will remain healthy after our node departs, before we allow this to occur.) + +Once all the processes are stopped and the services are shut down, all of the +filesystems will be unmounted. +This allows Talos to produce a very clean upgrade, as close as possible to a pristine system. +We verify the disk and then perform the actual image upgrade. + +Finally, we tell the bootloader to boot _once_ with the new kernel and OS image. +Then we reboot. + +After the node comes back up and Talos verifies itself, it will make permanent +the bootloader change, rejoin the cluster, and finally uncordon itself to receive new workloads. + +### FAQs + +**Q.** What happens if an upgrade fails? + +**A.** There are many potential ways an upgrade can fail, but we always try to do +the safe thing. + +The most common first failure is an invalid installer image reference. +In this case, Talos will fail to download the upgraded image and will abort the upgrade. + +Sometimes, Talos is unable to successfully kill off all of the disk access points, in which case it cannot safely unmount all filesystems to effect the upgrade. +In this case, it will abort the upgrade and reboot. + +It is possible (especially with test builds) that the upgraded Talos system will fail to start. +In this case, the node will be rebooted, and the bootloader will automatically use the previous Talos kernel and image, thus effectively aborting the upgrade. + +Lastly, it is possible that Talos itself will upgrade successfully, start up, and rejoin the cluster but your workload will fail to run on it, for whatever reason. +This is when you would use the `talosctl rollback` command to revert back to the previous Talos version. + +**Q.** Can upgrades be scheduled? + +**A.** We provide the [Talos Controller Manager](https://github.com/talos-systems/talos-controller-manager) to coordinate upgrades of a cluster. +Additionally, because the upgrade sequence is API-driven, you can easily tie this in to your own business logic to schedule and coordinate your upgrades. + +**Q.** Can the upgrade process be observed? + +**A.** The Talos Controller Manager does this internally, watching the logs of +the node being upgraded, using the streaming log API of Talos. + +You can do the same thing using the `talosctl logs --follow machined` command. + +**Q.** Are worker node upgrades handled differently from control plane node upgrades? + +**A.** Short answer: no. + +Long answer: Both node types follow the same set procedure. +However, since control plane nodes run additional services, such as etcd, there are some extra steps and checks performed on them. +From the user's standpoint, however, the processes are identical. + +There are also additional restrictions on upgrading control plane nodes. +For instance, Talos will refuse to upgrade a control plane node if that upgrade will cause a loss of quorum for etcd. +This can generally be worked around by setting `preserve` to `true`. + +**Q.** Will an upgrade try to do the whole cluster at once? +Can I break my cluster by upgrading everything? + +**A.** No. + +Nothing prevents the user from sending any number of near-simultaneous upgrades to each node of the cluster. +While most people would not attempt to do this, it may be the desired behaviour in certain situations. + +If, however, multiple control plane nodes are asked to upgrade at the same time, Talos will protect itself by making sure only one control plane node upgrades at any time, through its checking of etcd quorum. +A lease is taken out by the winning control plane node, and no other control plane node is allowed to execute the upgrade until the lease is released and the etcd cluster is healthy and _will_ be healthy when the next node performs its upgrade. + +**Q.** Is there an operator or controller which will keep my nodes updated +automatically? + +**A.** Yes. + +We provide the [Talos Controller Manager](https://github.com/talos-systems/talos-controller-manager) to perform this maintenance in a simple, controllable fashion. diff --git a/website/content/docs/v0.12/Local Platforms/docker.md b/website/content/docs/v0.12/Local Platforms/docker.md new file mode 100644 index 0000000000..43e4ee443e --- /dev/null +++ b/website/content/docs/v0.12/Local Platforms/docker.md @@ -0,0 +1,60 @@ +--- +title: Docker +description: "Creating Talos Kubernetes cluster using Docker." +--- + +In this guide we will create a Kubernetes cluster in Docker, using a containerized version of Talos. + +Running Talos in Docker is intended to be used in CI pipelines, and local testing when you need a quick and easy cluster. +Furthermore, if you are running Talos in production, it provides an excellent way for developers to develop against the same version of Talos. + +## Requirements + +The follow are requirements for running Talos in Docker: + +- Docker 18.03 or greater +- a recent version of [`talosctl`](https://github.com/talos-systems/talos/releases) + +## Caveats + +Due to the fact that Talos runs in a container, certain APIs are not available when running in Docker. +For example `upgrade`, `reset`, and APIs like these don't apply in container mode. + +## Create the Cluster + +Creating a local cluster is as simple as: + +```bash +talosctl cluster create --wait +``` + +Once the above finishes successfully, your talosconfig(`~/.talos/config`) will be configured to point to the new cluster. + +If you are running on MacOS, an additional command is required: + +```bash +talosctl config --endpoints 127.0.0.1 +``` + +> Note: Startup times can take up to a minute before the cluster is available. + +## Retrieve and Configure the `kubeconfig` + +```bash +talosctl kubeconfig . +kubectl --kubeconfig kubeconfig config set-cluster talos-default --server https://127.0.0.1:6443 +``` + +## Using the Cluster + +Once the cluster is available, you can make use of `talosctl` and `kubectl` to interact with the cluster. +For example, to view current running containers, run `talosctl containers` for a list of containers in the `system` namespace, or `talosctl containers -k` for the `k8s.io` namespace. +To view the logs of a container, use `talosctl logs ` or `talosctl logs -k `. + +## Cleaning Up + +To cleanup, run: + +```bash +talosctl cluster destroy +``` diff --git a/website/content/docs/v0.12/Local Platforms/firecracker.md b/website/content/docs/v0.12/Local Platforms/firecracker.md new file mode 100644 index 0000000000..8890788304 --- /dev/null +++ b/website/content/docs/v0.12/Local Platforms/firecracker.md @@ -0,0 +1,316 @@ +--- +title: Firecracker +description: "Creating Talos Kubernetes cluster using Firecracker VMs." +--- + +In this guide we will create a Kubernetes cluster using Firecracker. + +> Note: Talos on [QEMU](../qemu/) offers easier way to run Talos in a set of VMs. + +## Requirements + +- Linux +- a kernel with + - KVM enabled (`/dev/kvm` must exist) + - `CONFIG_NET_SCH_NETEM` enabled + - `CONFIG_NET_SCH_INGRESS` enabled +- at least `CAP_SYS_ADMIN` and `CAP_NET_ADMIN` capabilities +- [firecracker](https://github.com/firecracker-microvm/firecracker/releases) (v0.21.0 or higher) +- `bridge`, `static` and `firewall` CNI plugins from the [standard CNI plugins](https://github.com/containernetworking/cni), and `tc-redirect-tap` CNI plugin from the [awslabs tc-redirect-tap](https://github.com/awslabs/tc-redirect-tap) installed to `/opt/cni/bin` +- iptables +- `/etc/cni/conf.d` directory should exist +- `/var/run/netns` directory should exist + +## Installation + +### How to get firecracker (v0.21.0 or higher) + +You can download `firecracker` binary via +[github.com/firecracker-microvm/firecracker/releases](https://github.com/firecracker-microvm/firecracker/releases) + +```bash +curl https://github.com/firecracker-microvm/firecracker/releases/download//firecracker-- -L -o firecracker +``` + +For example version `v0.21.1` for `linux` platform: + +```bash +curl https://github.com/firecracker-microvm/firecracker/releases/download/v0.21.1/firecracker-v0.21.1-x86_64 -L -o firecracker +sudo cp firecracker /usr/local/bin +sudo chmod +x /usr/local/bin/firecracker +``` + +### Install talosctl + +You can download `talosctl` and all required binaries via +[github.com/talos-systems/talos/releases](https://github.com/talos-systems/talos/releases) + +```bash +curl https://github.com/talos-systems/talos/releases/download//talosctl-- -L -o talosctl +``` + +For example version `v0.11.0` for `linux` platform: + +```bash +curl https://github.com/talos-systems/talos/releases/latest/download/talosctl-linux-amd64 -L -o talosctl +sudo cp talosctl /usr/local/bin +sudo chmod +x /usr/local/bin/talosctl +``` + +### Install bridge, firewall and static required CNI plugins + +You can download standard CNI required plugins via +[github.com/containernetworking/plugins/releases](https://github.com/containernetworking/plugins/releases) + +```bash +curl https://github.com/containernetworking/plugins/releases/download//cni-plugins---tgz -L -o cni-plugins---.tgz +``` + +For example version `v0.9.5` for `linux` platform: + +```bash +curl https://github.com/containernetworking/plugins/releases/download/v0.9.5/cni-plugins-linux-amd64-v0.9.5.tgz -L -o cni-plugins-linux-amd64-v0.9.5.tgz +mkdir cni-plugins-linux +tar -xf cni-plugins-linux-amd64-v0.9.5.tgz -C cni-plugins-linux +sudo mkdir -p /opt/cni/bin +sudo cp cni-plugins-linux/{bridge,firewall,static} /opt/cni/bin +``` + +### Install tc-redirect-tap CNI plugin + +You should install CNI plugin from the `tc-redirect-tap` repository [github.com/awslabs/tc-redirect-tap](https://github.com/awslabs/tc-redirect-tap) + +```bash +go get -d github.com/awslabs/tc-redirect-tap/cmd/tc-redirect-tap +cd $GOPATH/src/github.com/awslabs/tc-redirect-tap +make all +sudo cp tc-redirect-tap /opt/cni/bin +``` + +> Note: if `$GOPATH` is not set, it defaults to `~/go`. + +## Install Talos kernel and initramfs + +Firecracker provisioner depends on Talos uncompressed kernel (`vmlinuz`) and initramfs (`initramfs.xz`). +These files can be downloaded from the Talos release: + +```bash +mkdir -p _out/ +curl https://github.com/talos-systems/talos/releases/download//vmlinuz -L -o _out/vmlinuz +curl https://github.com/talos-systems/talos/releases/download//initramfs.xz -L -o _out/initramfs.xz +``` + +For example version `v0.11.0`: + +```bash +curl https://github.com/talos-systems/talos/releases/latest/download/vmlinuz -L -o _out/vmlinuz +curl https://github.com/talos-systems/talos/releases/latest/download/initramfs.xz -L -o _out/initramfs.xz +``` + +## Create the Cluster + +```bash +sudo talosctl cluster create --provisioner firecracker +``` + +Once the above finishes successfully, your talosconfig(`~/.talos/config`) will be configured to point to the new cluster. + +## Retrieve and Configure the `kubeconfig` + +```bash +talosctl kubeconfig . +``` + +## Using the Cluster + +Once the cluster is available, you can make use of `talosctl` and `kubectl` to interact with the cluster. +For example, to view current running containers, run `talosctl containers` for a list of containers in the `system` namespace, or `talosctl containers -k` for the `k8s.io` namespace. +To view the logs of a container, use `talosctl logs ` or `talosctl logs -k `. + +A bridge interface will be created, and assigned the default IP 10.5.0.1. +Each node will be directly accessible on the subnet specified at cluster creation time. +A loadbalancer runs on 10.5.0.1 by default, which handles loadbalancing for the Talos, and Kubernetes APIs. + +You can see a summary of the cluster state by running: + +```bash +$ talosctl cluster show --provisioner firecracker +PROVISIONER firecracker +NAME talos-default +NETWORK NAME talos-default +NETWORK CIDR 10.5.0.0/24 +NETWORK GATEWAY 10.5.0.1 +NETWORK MTU 1500 + +NODES: + +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 +``` + +## Cleaning Up + +To cleanup, run: + +```bash +sudo talosctl cluster destroy --provisioner firecracker +``` + +> Note: In that case that the host machine is rebooted before destroying the cluster, you may need to manually remove `~/.talos/clusters/talos-default`. + +## Manual Clean Up + +The `talosctl cluster destroy` command depends heavily on the clusters state directory. +It contains all related information of the cluster. +The PIDs and network associated with the cluster nodes. + +If you happened to have deleted the state folder by mistake or you would like to cleanup +the environment, here are the steps how to do it manually: + +### Stopping VMs + +Find the process of `firecracker --api-sock` execute: + +```bash +ps -elf | grep '[f]irecracker --api-sock' +``` + +To stop the VMs manually, execute: + +```bash +sudo kill -s SIGTERM +``` + +Example output, where VMs are running with PIDs **158065** and **158216** + +```bash +ps -elf | grep '[f]irecracker --api-sock' +4 S root 158065 157615 44 80 0 - 264152 - 07:54 ? 00:34:25 firecracker --api-sock /root/.talos/clusters/k8s/k8s-master-1.sock +4 S root 158216 157617 18 80 0 - 264152 - 07:55 ? 00:14:47 firecracker --api-sock /root/.talos/clusters/k8s/k8s-worker-1.sock +sudo kill -s SIGTERM 158065 +sudo kill -s SIGTERM 158216 +``` + +### Remove VMs + +Find the process of `talosctl firecracker-launch` execute: + +```bash +ps -elf | grep 'talosctl firecracker-launch' +``` + +To remove the VMs manually, execute: + +```bash +sudo kill -s SIGTERM +``` + +Example output, where VMs are running with PIDs **157615** and **157617** + +```bash +ps -elf | grep '[t]alosctl firecracker-launch' +0 S root 157615 2835 0 80 0 - 184934 - 07:53 ? 00:00:00 talosctl firecracker-launch +0 S root 157617 2835 0 80 0 - 185062 - 07:53 ? 00:00:00 talosctl firecracker-launch +sudo kill -s SIGTERM 157615 +sudo kill -s SIGTERM 157617 +``` + +### Remove load balancer + +Find the process of `talosctl loadbalancer-launch` execute: + +```bash +ps -elf | grep 'talosctl loadbalancer-launch' +``` + +To remove the LB manually, execute: + +```bash +sudo kill -s SIGTERM +``` + +Example output, where loadbalancer is running with PID **157609** + +```bash +ps -elf | grep '[t]alosctl loadbalancer-launch' +4 S root 157609 2835 0 80 0 - 184998 - 07:53 ? 00:00:07 talosctl loadbalancer-launch --loadbalancer-addr 10.5.0.1 --loadbalancer-upstreams 10.5.0.2 +sudo kill -s SIGTERM 157609 +``` + +### Remove network + +This is more tricky part as if you have already deleted the state folder. +If you didn't then it is written in the `state.yaml` in the +`/root/.talos/clusters/` directory. + +```bash +sudo cat /root/.talos/clusters//state.yaml | grep bridgename +bridgename: talos +``` + +If you only had one cluster, then it will be the interface with name +`talos` + +```bash +46: talos: mtu 1500 qdisc noqueue state DOWN group default qlen 1000 + link/ether a6:72:f4:0a:d3:9c brd ff:ff:ff:ff:ff:ff + inet 10.5.0.1/24 brd 10.5.0.255 scope global talos17c13299 + valid_lft forever preferred_lft forever + inet6 fe80::a472:f4ff:fe0a:d39c/64 scope link + valid_lft forever preferred_lft forever +``` + +To remove this interface: + +```bash +sudo ip link del talos +``` + +### Remove state directory + +To remove the state directory execute: + +```bash +sudo rm -Rf /root/.talos/clusters/ +``` + +## Troubleshooting + +### Logs + +Inspect logs directory + +```bash +sudo cat /root/.talos/clusters//*.log +``` + +Logs are saved under `--.log` + +For example in case of **k8s** cluster name: + +```bash +sudo ls -la /root/.talos/clusters/k8s | grep log +-rw-r--r--. 1 root root 69415 Apr 26 20:58 k8s-master-1.log +-rw-r--r--. 1 root root 68345 Apr 26 20:58 k8s-worker-1.log +-rw-r--r--. 1 root root 24621 Apr 26 20:59 lb.log +``` + +Inspect logs during the installation + +```bash +sudo su - +tail -f /root/.talos/clusters//*.log +``` + +## Post-installation + +After executing these steps and you should be able to use `kubectl` + +```bash +sudo talosctl kubeconfig . +mv kubeconfig $HOME/.kube/config +sudo chown $USER:$USER $HOME/.kube/config +``` diff --git a/website/content/docs/v0.12/Local Platforms/qemu.md b/website/content/docs/v0.12/Local Platforms/qemu.md new file mode 100644 index 0000000000..6fb4509374 --- /dev/null +++ b/website/content/docs/v0.12/Local Platforms/qemu.md @@ -0,0 +1,299 @@ +--- +title: QEMU +description: "Creating Talos Kubernetes cluster using QEMU VMs." +--- + +In this guide we will create a Kubernetes cluster using QEMU. + + + +## Video Walkthrough + +To see a live demo of this writeup, see the video below: + + + +## Requirements + +- Linux +- a kernel with + - KVM enabled (`/dev/kvm` must exist) + - `CONFIG_NET_SCH_NETEM` enabled + - `CONFIG_NET_SCH_INGRESS` enabled +- at least `CAP_SYS_ADMIN` and `CAP_NET_ADMIN` capabilities +- QEMU +- `bridge`, `static` and `firewall` CNI plugins from the [standard CNI plugins](https://github.com/containernetworking/cni), and `tc-redirect-tap` CNI plugin from the [awslabs tc-redirect-tap](https://github.com/awslabs/tc-redirect-tap) installed to `/opt/cni/bin` (installed automatically by `talosctl`) +- iptables +- `/var/run/netns` directory should exist + +## Installation + +### How to get QEMU + +Install QEMU with your operating system package manager. +For example, on Ubuntu for x86: + +```bash +apt install qemu-system-x86 qemu-kvm +``` + +### Install talosctl + +You can download `talosctl` and all required binaries via +[github.com/talos-systems/talos/releases](https://github.com/talos-systems/talos/releases) + +```bash +curl https://github.com/talos-systems/talos/releases/download//talosctl-- -L -o talosctl +``` + +For example version `v0.11.0` for `linux` platform: + +```bash +curl https://github.com/talos-systems/talos/releases/latest/download/talosctl-linux-amd64 -L -o talosctl +sudo cp talosctl /usr/local/bin +sudo chmod +x /usr/local/bin/talosctl +``` + +## Install Talos kernel and initramfs + +QEMU provisioner depends on Talos kernel (`vmlinuz`) and initramfs (`initramfs.xz`). +These files can be downloaded from the Talos release: + +```bash +mkdir -p _out/ +curl https://github.com/talos-systems/talos/releases/download//vmlinuz- -L -o _out/vmlinuz- +curl https://github.com/talos-systems/talos/releases/download//initramfs-.xz -L -o _out/initramfs-.xz +``` + +For example version `v0.11.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 +``` + +## Create the Cluster + +For the first time, create root state directory as your user so that you can inspect the logs as non-root user: + +```bash +mkdir -p ~/.talos/clusters +``` + +Create the cluster: + +```bash +sudo -E talosctl cluster create --provisioner qemu +``` + +Before the first cluster is created, `talosctl` will download the CNI bundle for the VM provisioning and install it to `~/.talos/cni` directory. + +Once the above finishes successfully, your talosconfig (`~/.talos/config`) will be configured to point to the new cluster, and `kubeconfig` will be +downloaded and merged into default kubectl config location (`~/.kube/config`). + +Cluster provisioning process can be optimized with [registry pull-through cahces](../../guides/configuring-pull-through-cache/). + +## Using the Cluster + +Once the cluster is available, you can make use of `talosctl` and `kubectl` to interact with the cluster. +For example, to view current running containers, run `talosctl -n 10.5.0.2 containers` for a list of containers in the `system` namespace, or `talosctl -n 10.5.0.2 containers -k` for the `k8s.io` namespace. +To view the logs of a container, use `talosctl -n 10.5.0.2 logs ` or `talosctl -n 10.5.0.2 logs -k `. + +A bridge interface will be created, and assigned the default IP 10.5.0.1. +Each node will be directly accessible on the subnet specified at cluster creation time. +A loadbalancer runs on 10.5.0.1 by default, which handles loadbalancing for the Kubernetes APIs. + +You can see a summary of the cluster state by running: + +```bash +$ talosctl cluster show --provisioner qemu +PROVISIONER qemu +NAME talos-default +NETWORK NAME talos-default +NETWORK CIDR 10.5.0.0/24 +NETWORK GATEWAY 10.5.0.1 +NETWORK MTU 1500 + +NODES: + +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 +``` + +## Cleaning Up + +To cleanup, run: + +```bash +sudo -E talosctl cluster destroy --provisioner qemu +``` + +> Note: In that case that the host machine is rebooted before destroying the cluster, you may need to manually remove `~/.talos/clusters/talos-default`. + +## Manual Clean Up + +The `talosctl cluster destroy` command depends heavily on the clusters state directory. +It contains all related information of the cluster. +The PIDs and network associated with the cluster nodes. + +If you happened to have deleted the state folder by mistake or you would like to cleanup +the environment, here are the steps how to do it manually: + +### Remove VM Launchers + +Find the process of `talosctl qemu-launch`: + +```bash +ps -elf | grep 'talosctl qemu-launch' +``` + +To remove the VMs manually, execute: + +```bash +sudo kill -s SIGTERM +``` + +Example output, where VMs are running with PIDs **157615** and **157617** + +```bash +ps -elf | grep '[t]alosctl qemu-launch' +0 S root 157615 2835 0 80 0 - 184934 - 07:53 ? 00:00:00 talosctl qemu-launch +0 S root 157617 2835 0 80 0 - 185062 - 07:53 ? 00:00:00 talosctl qemu-launch +sudo kill -s SIGTERM 157615 +sudo kill -s SIGTERM 157617 +``` + +### Stopping VMs + +Find the process of `qemu-system`: + +```bash +ps -elf | grep 'qemu-system' +``` + +To stop the VMs manually, execute: + +```bash +sudo kill -s SIGTERM +``` + +Example output, where VMs are running with PIDs **158065** and **158216** + +```bash +ps -elf | grep qemu-system +2 S root 1061663 1061168 26 80 0 - 1786238 - 14:05 ? 01:53:56 qemu-system-x86_64 -m 2048 -drive format=raw,if=virtio,file=/home/username/.talos/clusters/talos-default/bootstrap-master.disk -smp cpus=2 -cpu max -nographic -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -device virtio-net-pci,netdev=net0,mac=1e:86:c6:b4:7c:c4 -device virtio-rng-pci -no-reboot -boot order=cn,reboot-timeout=5000 -smbios type=1,uuid=7ec0a73c-826e-4eeb-afd1-39ff9f9160ca -machine q35,accel=kvm +2 S root 1061663 1061170 67 80 0 - 621014 - 21:23 ? 00:00:07 qemu-system-x86_64 -m 2048 -drive format=raw,if=virtio,file=/homeusername/.talos/clusters/talos-default/pxe-1.disk -smp cpus=2 -cpu max -nographic -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -device virtio-net-pci,netdev=net0,mac=36:f3:2f:c3:9f:06 -device virtio-rng-pci -no-reboot -boot order=cn,reboot-timeout=5000 -smbios type=1,uuid=ce12a0d0-29c8-490f-b935-f6073ab916a6 -machine q35,accel=kvm +sudo kill -s SIGTERM 1061663 +sudo kill -s SIGTERM 1061663 +``` + +### Remove load balancer + +Find the process of `talosctl loadbalancer-launch`: + +```bash +ps -elf | grep 'talosctl loadbalancer-launch' +``` + +To remove the LB manually, execute: + +```bash +sudo kill -s SIGTERM +``` + +Example output, where loadbalancer is running with PID **157609** + +```bash +ps -elf | grep '[t]alosctl loadbalancer-launch' +4 S root 157609 2835 0 80 0 - 184998 - 07:53 ? 00:00:07 talosctl loadbalancer-launch --loadbalancer-addr 10.5.0.1 --loadbalancer-upstreams 10.5.0.2 +sudo kill -s SIGTERM 157609 +``` + +### Remove DHCP server + +Find the process of `talosctl dhcpd-launch`: + +```bash +ps -elf | grep 'talosctl dhcpd-launch' +``` + +To remove the LB manually, execute: + +```bash +sudo kill -s SIGTERM +``` + +Example output, where loadbalancer is running with PID **157609** + +```bash +ps -elf | grep '[t]alosctl dhcpd-launch' +4 S root 157609 2835 0 80 0 - 184998 - 07:53 ? 00:00:07 talosctl dhcpd-launch --state-path /home/username/.talos/clusters/talos-default --addr 10.5.0.1 --interface talosbd9c32bc +sudo kill -s SIGTERM 157609 +``` + +### Remove network + +This is more tricky part as if you have already deleted the state folder. +If you didn't then it is written in the `state.yaml` in the +`~/.talos/clusters/` directory. + +```bash +sudo cat ~/.talos/clusters//state.yaml | grep bridgename +bridgename: talos +``` + +If you only had one cluster, then it will be the interface with name +`talos` + +```bash +46: talos: mtu 1500 qdisc noqueue state DOWN group default qlen 1000 + link/ether a6:72:f4:0a:d3:9c brd ff:ff:ff:ff:ff:ff + inet 10.5.0.1/24 brd 10.5.0.255 scope global talos17c13299 + valid_lft forever preferred_lft forever + inet6 fe80::a472:f4ff:fe0a:d39c/64 scope link + valid_lft forever preferred_lft forever +``` + +To remove this interface: + +```bash +sudo ip link del talos +``` + +### Remove state directory + +To remove the state directory execute: + +```bash +sudo rm -Rf /home/$USER/.talos/clusters/ +``` + +## Troubleshooting + +### Logs + +Inspect logs directory + +```bash +sudo cat ~/.talos/clusters//*.log +``` + +Logs are saved under `--.log` + +For example in case of **k8s** cluster name: + +```bash +ls -la ~/.talos/clusters/k8s | grep log +-rw-r--r--. 1 root root 69415 Apr 26 20:58 k8s-master-1.log +-rw-r--r--. 1 root root 68345 Apr 26 20:58 k8s-worker-1.log +-rw-r--r--. 1 root root 24621 Apr 26 20:59 lb.log +``` + +Inspect logs during the installation + +```bash +tail -f ~/.talos/clusters//*.log +``` diff --git a/website/content/docs/v0.12/Local Platforms/virtualbox.md b/website/content/docs/v0.12/Local Platforms/virtualbox.md new file mode 100644 index 0000000000..6b674278e3 --- /dev/null +++ b/website/content/docs/v0.12/Local Platforms/virtualbox.md @@ -0,0 +1,190 @@ +--- +title: VirtualBox +description: "Creating Talos Kubernetes cluster using VurtualBox VMs." +--- + +In this guide we will create a Kubernetes cluster using VirtualBox. + +## Video Walkthrough + +To see a live demo of this writeup, visit Youtube here: + + + +## Installation + +### How to Get VirtualBox + +Install VirtualBox with your operating system package manager or from the [website](https://www.virtualbox.org/). +For example, on Ubuntu for x86: + +```bash +apt install virtualbox +``` + +### Install talosctl + +You can download `talosctl` via +[github.com/talos-systems/talos/releases](https://github.com/talos-systems/talos/releases) + +```bash +curl https://github.com/talos-systems/talos/releases/download//talosctl-- -L -o talosctl +``` + +For example version `v0.11.0` for `linux` platform: + +```bash +curl https://github.com/talos-systems/talos/releases/latest/download/talosctl-linux-amd64 -L -o talosctl +sudo cp talosctl /usr/local/bin +sudo chmod +x /usr/local/bin/talosctl +``` + +### Download ISO Image + +In order to install Talos in VirtualBox, you will need the ISO image from the Talos release page. +You can download `talos-amd64.iso` via +[github.com/talos-systems/talos/releases](https://github.com/talos-systems/talos/releases) + +```bash +mkdir -p _out/ +curl https://github.com/talos-systems/talos/releases/download//talos-.iso -L -o _out/talos-.iso +``` + +For example version `v0.11.0` for `linux` platform: + +```bash +mkdir -p _out/ +curl https://github.com/talos-systems/talos/releases/latest/download/talos-amd64.iso -L -o _out/talos-amd64.iso +``` + +## Create VMs + +Start by creating a new VM by clicking the "New" button in the VirtualBox UI: + + + +Supply a name for this VM, and specify the Type and Version: + + + +Edit the memory to supply at least 2GB of RAM for the VM: + + + +Proceed through the disk settings, keeping the defaults. +You can increase the disk space if desired. + +Once created, select the VM and hit "Settings": + + + +In the "System" section, supply at least 2 CPUs: + + + +In the "Network" section, switch the network "Attached To" section to "Bridged Adapter": + + + +Finally, in the "Storage" section, select the optical drive and, on the right, select the ISO by browsing your filesystem: + + + +Repeat this process for a second VM to use as a worker node. +You can also repeat this for additional nodes desired. + +## Start Control Plane Node + +Once the VMs have been created and updated, start the VM that will be the first control plane node. +This VM will boot the ISO image specified earlier and enter "maintenance mode". +Once the machine has entered maintenance mode, there will be a console log that details the IP address that the node received. +Take note of this IP address, which will be referred to as `$CONTROL_PLANE_IP` for the rest of this guide. +If you wish to export this IP as a bash variable, simply issue a command like `export CONTROL_PLANE_IP=1.2.3.4`. + + + +## Generate Machine Configurations + +With the IP address above, you can now generate the machine configurations to use for installing Talos and Kubernetes. +Issue the following command, updating the output directory, cluster name, and control plane IP as you see fit: + +```bash +talosctl gen config talos-vbox-cluster https://$CONTROL_PLANE_IP:6443 --output-dir _out +``` + +This will create several files in the `_out` directory: controlplane.yaml, join.yaml, and talosconfig. + +## Create Control Plane Node + +Using the `controlplane.yaml` generated above, you can now apply this config using talosctl. +Issue: + +```bash +talosctl apply-config --insecure --nodes $CONTROL_PLANE_IP --file _out/controlplane.yaml +``` + +You should now see some action in the VirtualBox console for this VM. +Talos will be installed to disk, the VM will reboot, and then Talos will configure the Kubernetes control plane on this VM. + +> Note: This process can be repeated multiple times to create an HA control plane. + +## Create Worker Node + +Create at least a single worker node using a process similar to the control plane creation above. +Start the worker node VM and wait for it to enter "maintenance mode". +Take note of the worker node's IP address, which will be referred to as `$WORKER_IP` + +Issue: + +```bash +talosctl apply-config --insecure --nodes $WORKER_IP --file _out/join.yaml +``` + +> Note: This process can be repeated multiple times to add additional workers. + +## Using the Cluster + +Once the cluster is available, you can make use of `talosctl` and `kubectl` to interact with the cluster. +For example, to view current running containers, run `talosctl containers` for a list of containers in the `system` namespace, or `talosctl containers -k` for the `k8s.io` namespace. +To view the logs of a container, use `talosctl logs ` or `talosctl logs -k `. + +First, configure talosctl to talk to your control plane node by issuing the following, updating paths and IPs as necessary: + +```bash +export TALOSCONFIG="_out/talosconfig" +talosctl config endpoint $CONTROL_PLANE_IP +talosctl config node $CONTROL_PLANE_IP +``` + +### Bootstrap Etcd + +Set the `endpoints` and `nodes`: + +```bash +talosctl --talosconfig talosconfig config endpoint +talosctl --talosconfig talosconfig config node +``` + +Bootstrap `etcd`: + +```bash +talosctl --talosconfig talosconfig bootstrap +``` + +### Retrieve the `kubeconfig` + +At this point we can retrieve the admin `kubeconfig` by running: + +```bash +talosctl --talosconfig talosconfig kubeconfig . +``` + +You can then use kubectl in this fashion: + +```bash +kubectl get nodes +``` + +## Cleaning Up + +To cleanup, simply stop and delete the virtual machines from the VirtualBox UI. diff --git a/website/content/docs/v0.12/Reference/api.md b/website/content/docs/v0.12/Reference/api.md new file mode 100644 index 0000000000..b1c6d006ef --- /dev/null +++ b/website/content/docs/v0.12/Reference/api.md @@ -0,0 +1,3475 @@ +--- +title: API +description: Talos gRPC API reference. +--- + +## Table of Contents + +- [common/common.proto](#common/common.proto) + - [Data](#common.Data) + - [DataResponse](#common.DataResponse) + - [Empty](#common.Empty) + - [EmptyResponse](#common.EmptyResponse) + - [Error](#common.Error) + - [Metadata](#common.Metadata) + + - [Code](#common.Code) + - [ContainerDriver](#common.ContainerDriver) + +- [inspect/inspect.proto](#inspect/inspect.proto) + - [ControllerDependencyEdge](#inspect.ControllerDependencyEdge) + - [ControllerRuntimeDependenciesResponse](#inspect.ControllerRuntimeDependenciesResponse) + - [ControllerRuntimeDependency](#inspect.ControllerRuntimeDependency) + + - [DependencyEdgeType](#inspect.DependencyEdgeType) + + - [InspectService](#inspect.InspectService) + +- [machine/machine.proto](#machine/machine.proto) + - [ApplyConfiguration](#machine.ApplyConfiguration) + - [ApplyConfigurationRequest](#machine.ApplyConfigurationRequest) + - [ApplyConfigurationResponse](#machine.ApplyConfigurationResponse) + - [Bootstrap](#machine.Bootstrap) + - [BootstrapRequest](#machine.BootstrapRequest) + - [BootstrapResponse](#machine.BootstrapResponse) + - [CNIConfig](#machine.CNIConfig) + - [CPUInfo](#machine.CPUInfo) + - [CPUInfoResponse](#machine.CPUInfoResponse) + - [CPUStat](#machine.CPUStat) + - [CPUsInfo](#machine.CPUsInfo) + - [ClusterConfig](#machine.ClusterConfig) + - [ClusterNetworkConfig](#machine.ClusterNetworkConfig) + - [Container](#machine.Container) + - [ContainerInfo](#machine.ContainerInfo) + - [ContainersRequest](#machine.ContainersRequest) + - [ContainersResponse](#machine.ContainersResponse) + - [ControlPlaneConfig](#machine.ControlPlaneConfig) + - [CopyRequest](#machine.CopyRequest) + - [DHCPOptionsConfig](#machine.DHCPOptionsConfig) + - [DiskStat](#machine.DiskStat) + - [DiskStats](#machine.DiskStats) + - [DiskStatsResponse](#machine.DiskStatsResponse) + - [DiskUsageInfo](#machine.DiskUsageInfo) + - [DiskUsageRequest](#machine.DiskUsageRequest) + - [DmesgRequest](#machine.DmesgRequest) + - [EtcdForfeitLeadership](#machine.EtcdForfeitLeadership) + - [EtcdForfeitLeadershipRequest](#machine.EtcdForfeitLeadershipRequest) + - [EtcdForfeitLeadershipResponse](#machine.EtcdForfeitLeadershipResponse) + - [EtcdLeaveCluster](#machine.EtcdLeaveCluster) + - [EtcdLeaveClusterRequest](#machine.EtcdLeaveClusterRequest) + - [EtcdLeaveClusterResponse](#machine.EtcdLeaveClusterResponse) + - [EtcdMember](#machine.EtcdMember) + - [EtcdMemberListRequest](#machine.EtcdMemberListRequest) + - [EtcdMemberListResponse](#machine.EtcdMemberListResponse) + - [EtcdMembers](#machine.EtcdMembers) + - [EtcdRecover](#machine.EtcdRecover) + - [EtcdRecoverResponse](#machine.EtcdRecoverResponse) + - [EtcdRemoveMember](#machine.EtcdRemoveMember) + - [EtcdRemoveMemberRequest](#machine.EtcdRemoveMemberRequest) + - [EtcdRemoveMemberResponse](#machine.EtcdRemoveMemberResponse) + - [EtcdSnapshotRequest](#machine.EtcdSnapshotRequest) + - [Event](#machine.Event) + - [EventsRequest](#machine.EventsRequest) + - [FeaturesInfo](#machine.FeaturesInfo) + - [FileInfo](#machine.FileInfo) + - [GenerateClientConfiguration](#machine.GenerateClientConfiguration) + - [GenerateClientConfigurationRequest](#machine.GenerateClientConfigurationRequest) + - [GenerateClientConfigurationResponse](#machine.GenerateClientConfigurationResponse) + - [GenerateConfiguration](#machine.GenerateConfiguration) + - [GenerateConfigurationRequest](#machine.GenerateConfigurationRequest) + - [GenerateConfigurationResponse](#machine.GenerateConfigurationResponse) + - [Hostname](#machine.Hostname) + - [HostnameResponse](#machine.HostnameResponse) + - [InstallConfig](#machine.InstallConfig) + - [ListRequest](#machine.ListRequest) + - [LoadAvg](#machine.LoadAvg) + - [LoadAvgResponse](#machine.LoadAvgResponse) + - [LogsRequest](#machine.LogsRequest) + - [MachineConfig](#machine.MachineConfig) + - [MemInfo](#machine.MemInfo) + - [Memory](#machine.Memory) + - [MemoryResponse](#machine.MemoryResponse) + - [MountStat](#machine.MountStat) + - [Mounts](#machine.Mounts) + - [MountsResponse](#machine.MountsResponse) + - [NetDev](#machine.NetDev) + - [NetworkConfig](#machine.NetworkConfig) + - [NetworkDeviceConfig](#machine.NetworkDeviceConfig) + - [NetworkDeviceStats](#machine.NetworkDeviceStats) + - [NetworkDeviceStatsResponse](#machine.NetworkDeviceStatsResponse) + - [PhaseEvent](#machine.PhaseEvent) + - [PlatformInfo](#machine.PlatformInfo) + - [Process](#machine.Process) + - [ProcessInfo](#machine.ProcessInfo) + - [ProcessesResponse](#machine.ProcessesResponse) + - [ReadRequest](#machine.ReadRequest) + - [Reboot](#machine.Reboot) + - [RebootResponse](#machine.RebootResponse) + - [RemoveBootkubeInitializedKey](#machine.RemoveBootkubeInitializedKey) + - [RemoveBootkubeInitializedKeyResponse](#machine.RemoveBootkubeInitializedKeyResponse) + - [Reset](#machine.Reset) + - [ResetPartitionSpec](#machine.ResetPartitionSpec) + - [ResetRequest](#machine.ResetRequest) + - [ResetResponse](#machine.ResetResponse) + - [Restart](#machine.Restart) + - [RestartEvent](#machine.RestartEvent) + - [RestartRequest](#machine.RestartRequest) + - [RestartResponse](#machine.RestartResponse) + - [Rollback](#machine.Rollback) + - [RollbackRequest](#machine.RollbackRequest) + - [RollbackResponse](#machine.RollbackResponse) + - [RouteConfig](#machine.RouteConfig) + - [SequenceEvent](#machine.SequenceEvent) + - [ServiceEvent](#machine.ServiceEvent) + - [ServiceEvents](#machine.ServiceEvents) + - [ServiceHealth](#machine.ServiceHealth) + - [ServiceInfo](#machine.ServiceInfo) + - [ServiceList](#machine.ServiceList) + - [ServiceListResponse](#machine.ServiceListResponse) + - [ServiceRestart](#machine.ServiceRestart) + - [ServiceRestartRequest](#machine.ServiceRestartRequest) + - [ServiceRestartResponse](#machine.ServiceRestartResponse) + - [ServiceStart](#machine.ServiceStart) + - [ServiceStartRequest](#machine.ServiceStartRequest) + - [ServiceStartResponse](#machine.ServiceStartResponse) + - [ServiceStateEvent](#machine.ServiceStateEvent) + - [ServiceStop](#machine.ServiceStop) + - [ServiceStopRequest](#machine.ServiceStopRequest) + - [ServiceStopResponse](#machine.ServiceStopResponse) + - [Shutdown](#machine.Shutdown) + - [ShutdownResponse](#machine.ShutdownResponse) + - [SoftIRQStat](#machine.SoftIRQStat) + - [StartRequest](#machine.StartRequest) + - [StartResponse](#machine.StartResponse) + - [Stat](#machine.Stat) + - [Stats](#machine.Stats) + - [StatsRequest](#machine.StatsRequest) + - [StatsResponse](#machine.StatsResponse) + - [StopRequest](#machine.StopRequest) + - [StopResponse](#machine.StopResponse) + - [SystemStat](#machine.SystemStat) + - [SystemStatResponse](#machine.SystemStatResponse) + - [TaskEvent](#machine.TaskEvent) + - [Upgrade](#machine.Upgrade) + - [UpgradeRequest](#machine.UpgradeRequest) + - [UpgradeResponse](#machine.UpgradeResponse) + - [Version](#machine.Version) + - [VersionInfo](#machine.VersionInfo) + - [VersionResponse](#machine.VersionResponse) + + - [ListRequest.Type](#machine.ListRequest.Type) + - [MachineConfig.MachineType](#machine.MachineConfig.MachineType) + - [PhaseEvent.Action](#machine.PhaseEvent.Action) + - [SequenceEvent.Action](#machine.SequenceEvent.Action) + - [ServiceStateEvent.Action](#machine.ServiceStateEvent.Action) + - [TaskEvent.Action](#machine.TaskEvent.Action) + + - [MachineService](#machine.MachineService) + +- [network/network.proto](#network/network.proto) + - [Interface](#network.Interface) + - [Interfaces](#network.Interfaces) + - [InterfacesResponse](#network.InterfacesResponse) + - [Route](#network.Route) + - [Routes](#network.Routes) + - [RoutesResponse](#network.RoutesResponse) + + - [AddressFamily](#network.AddressFamily) + - [InterfaceFlags](#network.InterfaceFlags) + - [RouteProtocol](#network.RouteProtocol) + + - [NetworkService](#network.NetworkService) + +- [resource/resource.proto](#resource/resource.proto) + - [Get](#resource.Get) + - [GetRequest](#resource.GetRequest) + - [GetResponse](#resource.GetResponse) + - [ListRequest](#resource.ListRequest) + - [ListResponse](#resource.ListResponse) + - [Metadata](#resource.Metadata) + - [Resource](#resource.Resource) + - [Spec](#resource.Spec) + - [WatchRequest](#resource.WatchRequest) + - [WatchResponse](#resource.WatchResponse) + + - [EventType](#resource.EventType) + + - [ResourceService](#resource.ResourceService) + +- [security/security.proto](#security/security.proto) + - [CertificateRequest](#securityapi.CertificateRequest) + - [CertificateResponse](#securityapi.CertificateResponse) + + - [SecurityService](#securityapi.SecurityService) + +- [storage/storage.proto](#storage/storage.proto) + - [Disk](#storage.Disk) + - [Disks](#storage.Disks) + - [DisksResponse](#storage.DisksResponse) + + - [Disk.DiskType](#storage.Disk.DiskType) + + - [StorageService](#storage.StorageService) + +- [time/time.proto](#time/time.proto) + - [Time](#time.Time) + - [TimeRequest](#time.TimeRequest) + - [TimeResponse](#time.TimeResponse) + + - [TimeService](#time.TimeService) + +- [Scalar Value Types](#scalar-value-types) + + + + +

Top

+ +## common/common.proto + + + + + +### Data + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [Metadata](#common.Metadata) | | | +| bytes | [bytes](#bytes) | | | + + + + + + + + +### DataResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Data](#common.Data) | repeated | | + + + + + + + + +### Empty + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [Metadata](#common.Metadata) | | | + + + + + + + + +### EmptyResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Empty](#common.Empty) | repeated | | + + + + + + + + +### Error + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code | [Code](#common.Code) | | | +| message | [string](#string) | | | +| details | [google.protobuf.Any](#google.protobuf.Any) | repeated | | + + + + + + + + +### Metadata +Common metadata message nested in all reply message types + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| hostname | [string](#string) | | hostname of the server response comes from (injected by proxy) | +| error | [string](#string) | | error is set if request failed to the upstream (rest of response is undefined) | +| status | [google.rpc.Status](#google.rpc.Status) | | error as gRPC Status | + + + + + + + + + + +### Code + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| FATAL | 0 | | +| LOCKED | 1 | | + + + + + +### ContainerDriver + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| CONTAINERD | 0 | | +| CRI | 1 | | + + + + + + + + + + + +

Top

+ +## inspect/inspect.proto + + + + + +### ControllerDependencyEdge + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| controller_name | [string](#string) | | | +| edge_type | [DependencyEdgeType](#inspect.DependencyEdgeType) | | | +| resource_namespace | [string](#string) | | | +| resource_type | [string](#string) | | | +| resource_id | [string](#string) | | | + + + + + + + + +### ControllerRuntimeDependenciesResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [ControllerRuntimeDependency](#inspect.ControllerRuntimeDependency) | repeated | | + + + + + + + + +### ControllerRuntimeDependency +The ControllerRuntimeDependency message contains the graph of controller-resource dependencies. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| edges | [ControllerDependencyEdge](#inspect.ControllerDependencyEdge) | repeated | | + + + + + + + + + + +### DependencyEdgeType + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| OUTPUT_EXCLUSIVE | 0 | | +| OUTPUT_SHARED | 3 | | +| INPUT_STRONG | 1 | | +| INPUT_WEAK | 2 | | +| INPUT_DESTROY_READY | 4 | | + + + + + + + + + +### InspectService +The inspect service definition. + +InspectService provides auxilary API to inspect OS internals. + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| ControllerRuntimeDependencies | [.google.protobuf.Empty](#google.protobuf.Empty) | [ControllerRuntimeDependenciesResponse](#inspect.ControllerRuntimeDependenciesResponse) | | + + + + + + +

Top

+ +## machine/machine.proto + + + + + +### ApplyConfiguration +ApplyConfigurationResponse describes the response to a configuration request. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| warnings | [string](#string) | repeated | Configuration validation warnings. | + + + + + + + + +### ApplyConfigurationRequest +rpc applyConfiguration +ApplyConfiguration describes a request to assert a new configuration upon a +node. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [bytes](#bytes) | | | +| on_reboot | [bool](#bool) | | | +| immediate | [bool](#bool) | | | + + + + + + + + +### ApplyConfigurationResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [ApplyConfiguration](#machine.ApplyConfiguration) | repeated | | + + + + + + + + +### Bootstrap +The bootstrap message containing the bootstrap status. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | + + + + + + + + +### BootstrapRequest +rpc Bootstrap + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| recover_etcd | [bool](#bool) | | Enable etcd recovery from the snapshot. + +Snapshot should be uploaded before this call via EtcdRecover RPC. | +| recover_skip_hash_check | [bool](#bool) | | Skip hash check on the snapshot (etcd). + +Enable this when recovering from data directory copy to skip integrity check. | + + + + + + + + +### BootstrapResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Bootstrap](#machine.Bootstrap) | repeated | | + + + + + + + + +### CNIConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | | +| urls | [string](#string) | repeated | | + + + + + + + + +### CPUInfo + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| processor | [uint32](#uint32) | | | +| vendor_id | [string](#string) | | | +| cpu_family | [string](#string) | | | +| model | [string](#string) | | | +| model_name | [string](#string) | | | +| stepping | [string](#string) | | | +| microcode | [string](#string) | | | +| cpu_mhz | [double](#double) | | | +| cache_size | [string](#string) | | | +| physical_id | [string](#string) | | | +| siblings | [uint32](#uint32) | | | +| core_id | [string](#string) | | | +| cpu_cores | [uint32](#uint32) | | | +| apic_id | [string](#string) | | | +| initial_apic_id | [string](#string) | | | +| fpu | [string](#string) | | | +| fpu_exception | [string](#string) | | | +| cpu_id_level | [uint32](#uint32) | | | +| wp | [string](#string) | | | +| flags | [string](#string) | repeated | | +| bugs | [string](#string) | repeated | | +| bogo_mips | [double](#double) | | | +| cl_flush_size | [uint32](#uint32) | | | +| cache_alignment | [uint32](#uint32) | | | +| address_sizes | [string](#string) | | | +| power_management | [string](#string) | | | + + + + + + + + +### CPUInfoResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [CPUsInfo](#machine.CPUsInfo) | repeated | | + + + + + + + + +### CPUStat + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| user | [double](#double) | | | +| nice | [double](#double) | | | +| system | [double](#double) | | | +| idle | [double](#double) | | | +| iowait | [double](#double) | | | +| irq | [double](#double) | | | +| soft_irq | [double](#double) | | | +| steal | [double](#double) | | | +| guest | [double](#double) | | | +| guest_nice | [double](#double) | | | + + + + + + + + +### CPUsInfo + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| cpu_info | [CPUInfo](#machine.CPUInfo) | repeated | | + + + + + + + + +### ClusterConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | | +| control_plane | [ControlPlaneConfig](#machine.ControlPlaneConfig) | | | +| cluster_network | [ClusterNetworkConfig](#machine.ClusterNetworkConfig) | | | +| allow_scheduling_on_masters | [bool](#bool) | | | + + + + + + + + +### ClusterNetworkConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| dns_domain | [string](#string) | | | +| cni_config | [CNIConfig](#machine.CNIConfig) | | | + + + + + + + + +### Container +The messages message containing the requested containers. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| containers | [ContainerInfo](#machine.ContainerInfo) | repeated | | + + + + + + + + +### ContainerInfo +The messages message containing the requested containers. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | | +| id | [string](#string) | | | +| image | [string](#string) | | | +| pid | [uint32](#uint32) | | | +| status | [string](#string) | | | +| pod_id | [string](#string) | | | +| name | [string](#string) | | | + + + + + + + + +### ContainersRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | | +| driver | [common.ContainerDriver](#common.ContainerDriver) | | driver might be default "containerd" or "cri" | + + + + + + + + +### ContainersResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Container](#machine.Container) | repeated | | + + + + + + + + +### ControlPlaneConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| endpoint | [string](#string) | | | + + + + + + + + +### CopyRequest +CopyRequest describes a request to copy data out of Talos node + +Copy produces .tar.gz archive which is streamed back to the caller + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| root_path | [string](#string) | | Root path to start copying data out, it might be either a file or directory | + + + + + + + + +### DHCPOptionsConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| route_metric | [uint32](#uint32) | | | + + + + + + + + +### DiskStat + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | | +| read_completed | [uint64](#uint64) | | | +| read_merged | [uint64](#uint64) | | | +| read_sectors | [uint64](#uint64) | | | +| read_time_ms | [uint64](#uint64) | | | +| write_completed | [uint64](#uint64) | | | +| write_merged | [uint64](#uint64) | | | +| write_sectors | [uint64](#uint64) | | | +| write_time_ms | [uint64](#uint64) | | | +| io_in_progress | [uint64](#uint64) | | | +| io_time_ms | [uint64](#uint64) | | | +| io_time_weighted_ms | [uint64](#uint64) | | | +| discard_completed | [uint64](#uint64) | | | +| discard_merged | [uint64](#uint64) | | | +| discard_sectors | [uint64](#uint64) | | | +| discard_time_ms | [uint64](#uint64) | | | + + + + + + + + +### DiskStats + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| total | [DiskStat](#machine.DiskStat) | | | +| devices | [DiskStat](#machine.DiskStat) | repeated | | + + + + + + + + +### DiskStatsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [DiskStats](#machine.DiskStats) | repeated | | + + + + + + + + +### DiskUsageInfo +DiskUsageInfo describes a file or directory's information for du command + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| name | [string](#string) | | Name is the name (including prefixed path) of the file or directory | +| size | [int64](#int64) | | Size indicates the number of bytes contained within the file | +| error | [string](#string) | | Error describes any error encountered while trying to read the file information. | +| relative_name | [string](#string) | | RelativeName is the name of the file or directory relative to the RootPath | + + + + + + + + +### DiskUsageRequest +DiskUsageRequest describes a request to list disk usage of directories and regular files + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| recursion_depth | [int32](#int32) | | RecursionDepth indicates how many levels of subdirectories should be recursed. The default (0) indicates that no limit should be enforced. | +| all | [bool](#bool) | | All write sizes for all files, not just directories. | +| threshold | [int64](#int64) | | Threshold exclude entries smaller than SIZE if positive, or entries greater than SIZE if negative. | +| paths | [string](#string) | repeated | DiskUsagePaths is the list of directories to calculate disk usage for. | + + + + + + + + +### DmesgRequest +dmesg + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| follow | [bool](#bool) | | | +| tail | [bool](#bool) | | | + + + + + + + + +### EtcdForfeitLeadership + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| member | [string](#string) | | | + + + + + + + + +### EtcdForfeitLeadershipRequest + + + + + + + + + +### EtcdForfeitLeadershipResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [EtcdForfeitLeadership](#machine.EtcdForfeitLeadership) | repeated | | + + + + + + + + +### EtcdLeaveCluster + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | + + + + + + + + +### EtcdLeaveClusterRequest + + + + + + + + + +### EtcdLeaveClusterResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [EtcdLeaveCluster](#machine.EtcdLeaveCluster) | repeated | | + + + + + + + + +### EtcdMember +EtcdMember describes a single etcd member. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [uint64](#uint64) | | member ID. | +| hostname | [string](#string) | | human-readable name of the member. | +| peer_urls | [string](#string) | repeated | the list of URLs the member exposes to clients for communication. | +| client_urls | [string](#string) | repeated | the list of URLs the member exposes to the cluster for communication. | + + + + + + + + +### EtcdMemberListRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| query_local | [bool](#bool) | | | + + + + + + + + +### EtcdMemberListResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [EtcdMembers](#machine.EtcdMembers) | repeated | | + + + + + + + + +### EtcdMembers +EtcdMembers contains the list of members registered on the host. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| legacy_members | [string](#string) | repeated | list of member hostnames. | +| members | [EtcdMember](#machine.EtcdMember) | repeated | the list of etcd members registered on the node. | + + + + + + + + +### EtcdRecover + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | + + + + + + + + +### EtcdRecoverResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [EtcdRecover](#machine.EtcdRecover) | repeated | | + + + + + + + + +### EtcdRemoveMember + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | + + + + + + + + +### EtcdRemoveMemberRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| member | [string](#string) | | | + + + + + + + + +### EtcdRemoveMemberResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [EtcdRemoveMember](#machine.EtcdRemoveMember) | repeated | | + + + + + + + + +### EtcdSnapshotRequest + + + + + + + + + +### Event + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| data | [google.protobuf.Any](#google.protobuf.Any) | | | +| id | [string](#string) | | | + + + + + + + + +### EventsRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| tail_events | [int32](#int32) | | | +| tail_id | [string](#string) | | | +| tail_seconds | [int32](#int32) | | | + + + + + + + + +### FeaturesInfo +FeaturesInfo describes individual Talos features that can be switched on or off. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| rbac | [bool](#bool) | | RBAC is true if role-based access control is enabled. | + + + + + + + + +### FileInfo +FileInfo describes a file or directory's information + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| name | [string](#string) | | Name is the name (including prefixed path) of the file or directory | +| size | [int64](#int64) | | Size indicates the number of bytes contained within the file | +| mode | [uint32](#uint32) | | Mode is the bitmap of UNIX mode/permission flags of the file | +| modified | [int64](#int64) | | Modified indicates the UNIX timestamp at which the file was last modified + +TODO: unix timestamp or include proto's Date type | +| is_dir | [bool](#bool) | | IsDir indicates that the file is a directory | +| error | [string](#string) | | Error describes any error encountered while trying to read the file information. | +| link | [string](#string) | | Link is filled with symlink target | +| relative_name | [string](#string) | | RelativeName is the name of the file or directory relative to the RootPath | + + + + + + + + +### GenerateClientConfiguration + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| ca | [bytes](#bytes) | | PEM-encoded CA certificate. | +| crt | [bytes](#bytes) | | PEM-encoded generated client certificate. | +| key | [bytes](#bytes) | | PEM-encoded generated client key. | +| talosconfig | [bytes](#bytes) | | Client configuration (talosconfig) file content. | + + + + + + + + +### GenerateClientConfigurationRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| roles | [string](#string) | repeated | Roles in the generated client certificate. | +| crt_ttl | [google.protobuf.Duration](#google.protobuf.Duration) | | Client certificate TTL. | + + + + + + + + +### GenerateClientConfigurationResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [GenerateClientConfiguration](#machine.GenerateClientConfiguration) | repeated | | + + + + + + + + +### GenerateConfiguration +GenerateConfiguration describes the response to a generate configuration request. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| data | [bytes](#bytes) | repeated | | +| talosconfig | [bytes](#bytes) | | | + + + + + + + + +### GenerateConfigurationRequest +GenerateConfigurationRequest describes a request to generate a new configuration +on a node. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| config_version | [string](#string) | | | +| cluster_config | [ClusterConfig](#machine.ClusterConfig) | | | +| machine_config | [MachineConfig](#machine.MachineConfig) | | | +| override_time | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | + + + + + + + + +### GenerateConfigurationResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [GenerateConfiguration](#machine.GenerateConfiguration) | repeated | | + + + + + + + + +### Hostname + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| hostname | [string](#string) | | | + + + + + + + + +### HostnameResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Hostname](#machine.Hostname) | repeated | | + + + + + + + + +### InstallConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| install_disk | [string](#string) | | | +| install_image | [string](#string) | | | + + + + + + + + +### ListRequest +ListRequest describes a request to list the contents of a directory. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| root | [string](#string) | | Root indicates the root directory for the list. If not indicated, '/' is presumed. | +| recurse | [bool](#bool) | | Recurse indicates that subdirectories should be recursed. | +| recursion_depth | [int32](#int32) | | RecursionDepth indicates how many levels of subdirectories should be recursed. The default (0) indicates that no limit should be enforced. | +| types | [ListRequest.Type](#machine.ListRequest.Type) | repeated | Types indicates what file type should be returned. If not indicated, all files will be returned. | + + + + + + + + +### LoadAvg + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| load1 | [double](#double) | | | +| load5 | [double](#double) | | | +| load15 | [double](#double) | | | + + + + + + + + +### LoadAvgResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [LoadAvg](#machine.LoadAvg) | repeated | | + + + + + + + + +### LogsRequest +rpc logs +The request message containing the process name. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | | +| id | [string](#string) | | | +| driver | [common.ContainerDriver](#common.ContainerDriver) | | driver might be default "containerd" or "cri" | +| follow | [bool](#bool) | | | +| tail_lines | [int32](#int32) | | | + + + + + + + + +### MachineConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| type | [MachineConfig.MachineType](#machine.MachineConfig.MachineType) | | | +| install_config | [InstallConfig](#machine.InstallConfig) | | | +| network_config | [NetworkConfig](#machine.NetworkConfig) | | | +| kubernetes_version | [string](#string) | | | + + + + + + + + +### MemInfo + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| memtotal | [uint64](#uint64) | | | +| memfree | [uint64](#uint64) | | | +| memavailable | [uint64](#uint64) | | | +| buffers | [uint64](#uint64) | | | +| cached | [uint64](#uint64) | | | +| swapcached | [uint64](#uint64) | | | +| active | [uint64](#uint64) | | | +| inactive | [uint64](#uint64) | | | +| activeanon | [uint64](#uint64) | | | +| inactiveanon | [uint64](#uint64) | | | +| activefile | [uint64](#uint64) | | | +| inactivefile | [uint64](#uint64) | | | +| unevictable | [uint64](#uint64) | | | +| mlocked | [uint64](#uint64) | | | +| swaptotal | [uint64](#uint64) | | | +| swapfree | [uint64](#uint64) | | | +| dirty | [uint64](#uint64) | | | +| writeback | [uint64](#uint64) | | | +| anonpages | [uint64](#uint64) | | | +| mapped | [uint64](#uint64) | | | +| shmem | [uint64](#uint64) | | | +| slab | [uint64](#uint64) | | | +| sreclaimable | [uint64](#uint64) | | | +| sunreclaim | [uint64](#uint64) | | | +| kernelstack | [uint64](#uint64) | | | +| pagetables | [uint64](#uint64) | | | +| nfsunstable | [uint64](#uint64) | | | +| bounce | [uint64](#uint64) | | | +| writebacktmp | [uint64](#uint64) | | | +| commitlimit | [uint64](#uint64) | | | +| committedas | [uint64](#uint64) | | | +| vmalloctotal | [uint64](#uint64) | | | +| vmallocused | [uint64](#uint64) | | | +| vmallocchunk | [uint64](#uint64) | | | +| hardwarecorrupted | [uint64](#uint64) | | | +| anonhugepages | [uint64](#uint64) | | | +| shmemhugepages | [uint64](#uint64) | | | +| shmempmdmapped | [uint64](#uint64) | | | +| cmatotal | [uint64](#uint64) | | | +| cmafree | [uint64](#uint64) | | | +| hugepagestotal | [uint64](#uint64) | | | +| hugepagesfree | [uint64](#uint64) | | | +| hugepagesrsvd | [uint64](#uint64) | | | +| hugepagessurp | [uint64](#uint64) | | | +| hugepagesize | [uint64](#uint64) | | | +| directmap4k | [uint64](#uint64) | | | +| directmap2m | [uint64](#uint64) | | | +| directmap1g | [uint64](#uint64) | | | + + + + + + + + +### Memory + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| meminfo | [MemInfo](#machine.MemInfo) | | | + + + + + + + + +### MemoryResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Memory](#machine.Memory) | repeated | | + + + + + + + + +### MountStat +The messages message containing the requested processes. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| filesystem | [string](#string) | | | +| size | [uint64](#uint64) | | | +| available | [uint64](#uint64) | | | +| mounted_on | [string](#string) | | | + + + + + + + + +### Mounts +The messages message containing the requested df stats. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| stats | [MountStat](#machine.MountStat) | repeated | | + + + + + + + + +### MountsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Mounts](#machine.Mounts) | repeated | | + + + + + + + + +### NetDev + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | | +| rx_bytes | [uint64](#uint64) | | | +| rx_packets | [uint64](#uint64) | | | +| rx_errors | [uint64](#uint64) | | | +| rx_dropped | [uint64](#uint64) | | | +| rx_fifo | [uint64](#uint64) | | | +| rx_frame | [uint64](#uint64) | | | +| rx_compressed | [uint64](#uint64) | | | +| rx_multicast | [uint64](#uint64) | | | +| tx_bytes | [uint64](#uint64) | | | +| tx_packets | [uint64](#uint64) | | | +| tx_errors | [uint64](#uint64) | | | +| tx_dropped | [uint64](#uint64) | | | +| tx_fifo | [uint64](#uint64) | | | +| tx_collisions | [uint64](#uint64) | | | +| tx_carrier | [uint64](#uint64) | | | +| tx_compressed | [uint64](#uint64) | | | + + + + + + + + +### NetworkConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| hostname | [string](#string) | | | +| interfaces | [NetworkDeviceConfig](#machine.NetworkDeviceConfig) | repeated | | + + + + + + + + +### NetworkDeviceConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| interface | [string](#string) | | | +| cidr | [string](#string) | | | +| mtu | [int32](#int32) | | | +| dhcp | [bool](#bool) | | | +| ignore | [bool](#bool) | | | +| dhcp_options | [DHCPOptionsConfig](#machine.DHCPOptionsConfig) | | | +| routes | [RouteConfig](#machine.RouteConfig) | repeated | | + + + + + + + + +### NetworkDeviceStats + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| total | [NetDev](#machine.NetDev) | | | +| devices | [NetDev](#machine.NetDev) | repeated | | + + + + + + + + +### NetworkDeviceStatsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [NetworkDeviceStats](#machine.NetworkDeviceStats) | repeated | | + + + + + + + + +### PhaseEvent + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| phase | [string](#string) | | | +| action | [PhaseEvent.Action](#machine.PhaseEvent.Action) | | | + + + + + + + + +### PlatformInfo + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | | +| mode | [string](#string) | | | + + + + + + + + +### Process + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| processes | [ProcessInfo](#machine.ProcessInfo) | repeated | | + + + + + + + + +### ProcessInfo + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| pid | [int32](#int32) | | | +| ppid | [int32](#int32) | | | +| state | [string](#string) | | | +| threads | [int32](#int32) | | | +| cpu_time | [double](#double) | | | +| virtual_memory | [uint64](#uint64) | | | +| resident_memory | [uint64](#uint64) | | | +| command | [string](#string) | | | +| executable | [string](#string) | | | +| args | [string](#string) | | | + + + + + + + + +### ProcessesResponse +rpc processes + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Process](#machine.Process) | repeated | | + + + + + + + + +### ReadRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| path | [string](#string) | | | + + + + + + + + +### Reboot +rpc reboot +The reboot message containing the reboot status. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | + + + + + + + + +### RebootResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Reboot](#machine.Reboot) | repeated | | + + + + + + + + +### RemoveBootkubeInitializedKey +RemoveBootkubeInitializedKeyResponse describes the response to a RemoveBootkubeInitializedKey request. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | + + + + + + + + +### RemoveBootkubeInitializedKeyResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [RemoveBootkubeInitializedKey](#machine.RemoveBootkubeInitializedKey) | repeated | | + + + + + + + + +### Reset +The reset message containing the restart status. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | + + + + + + + + +### ResetPartitionSpec +rpc reset + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| label | [string](#string) | | | +| wipe | [bool](#bool) | | | + + + + + + + + +### ResetRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| graceful | [bool](#bool) | | Graceful indicates whether node should leave etcd before the upgrade, it also enforces etcd checks before leaving. | +| reboot | [bool](#bool) | | Reboot indicates whether node should reboot or halt after resetting. | +| system_partitions_to_wipe | [ResetPartitionSpec](#machine.ResetPartitionSpec) | repeated | System_partitions_to_wipe lists specific system disk partitions to be reset (wiped). If system_partitions_to_wipe is empty, all the partitions are erased. | + + + + + + + + +### ResetResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Reset](#machine.Reset) | repeated | | + + + + + + + + +### Restart + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | + + + + + + + + +### RestartEvent + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| cmd | [int64](#int64) | | | + + + + + + + + +### RestartRequest +rpc restart +The request message containing the process to restart. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | | +| id | [string](#string) | | | +| driver | [common.ContainerDriver](#common.ContainerDriver) | | driver might be default "containerd" or "cri" | + + + + + + + + +### RestartResponse +The messages message containing the restart status. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Restart](#machine.Restart) | repeated | | + + + + + + + + +### Rollback + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | + + + + + + + + +### RollbackRequest +rpc rollback + + + + + + + + +### RollbackResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Rollback](#machine.Rollback) | repeated | | + + + + + + + + +### RouteConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| network | [string](#string) | | | +| gateway | [string](#string) | | | +| metric | [uint32](#uint32) | | | + + + + + + + + +### SequenceEvent +rpc events + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| sequence | [string](#string) | | | +| action | [SequenceEvent.Action](#machine.SequenceEvent.Action) | | | +| error | [common.Error](#common.Error) | | | + + + + + + + + +### ServiceEvent + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| msg | [string](#string) | | | +| state | [string](#string) | | | +| ts | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | + + + + + + + + +### ServiceEvents + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| events | [ServiceEvent](#machine.ServiceEvent) | repeated | | + + + + + + + + +### ServiceHealth + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| unknown | [bool](#bool) | | | +| healthy | [bool](#bool) | | | +| last_message | [string](#string) | | | +| last_change | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | + + + + + + + + +### ServiceInfo + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | +| state | [string](#string) | | | +| events | [ServiceEvents](#machine.ServiceEvents) | | | +| health | [ServiceHealth](#machine.ServiceHealth) | | | + + + + + + + + +### ServiceList +rpc servicelist + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| services | [ServiceInfo](#machine.ServiceInfo) | repeated | | + + + + + + + + +### ServiceListResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [ServiceList](#machine.ServiceList) | repeated | | + + + + + + + + +### ServiceRestart + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| resp | [string](#string) | | | + + + + + + + + +### ServiceRestartRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | + + + + + + + + +### ServiceRestartResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [ServiceRestart](#machine.ServiceRestart) | repeated | | + + + + + + + + +### ServiceStart + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| resp | [string](#string) | | | + + + + + + + + +### ServiceStartRequest +rpc servicestart + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | + + + + + + + + +### ServiceStartResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [ServiceStart](#machine.ServiceStart) | repeated | | + + + + + + + + +### ServiceStateEvent + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| service | [string](#string) | | | +| action | [ServiceStateEvent.Action](#machine.ServiceStateEvent.Action) | | | +| message | [string](#string) | | | +| health | [ServiceHealth](#machine.ServiceHealth) | | | + + + + + + + + +### ServiceStop + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| resp | [string](#string) | | | + + + + + + + + +### ServiceStopRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | + + + + + + + + +### ServiceStopResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [ServiceStop](#machine.ServiceStop) | repeated | | + + + + + + + + +### Shutdown +rpc shutdown +The messages message containing the shutdown status. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | + + + + + + + + +### ShutdownResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Shutdown](#machine.Shutdown) | repeated | | + + + + + + + + +### SoftIRQStat + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| hi | [uint64](#uint64) | | | +| timer | [uint64](#uint64) | | | +| net_tx | [uint64](#uint64) | | | +| net_rx | [uint64](#uint64) | | | +| block | [uint64](#uint64) | | | +| block_io_poll | [uint64](#uint64) | | | +| tasklet | [uint64](#uint64) | | | +| sched | [uint64](#uint64) | | | +| hrtimer | [uint64](#uint64) | | | +| rcu | [uint64](#uint64) | | | + + + + + + + + +### StartRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | + + + + + + + + +### StartResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| resp | [string](#string) | | | + + + + + + + + +### Stat +The messages message containing the requested stat. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | | +| id | [string](#string) | | | +| memory_usage | [uint64](#uint64) | | | +| cpu_usage | [uint64](#uint64) | | | +| pod_id | [string](#string) | | | +| name | [string](#string) | | | + + + + + + + + +### Stats +The messages message containing the requested stats. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| stats | [Stat](#machine.Stat) | repeated | | + + + + + + + + +### StatsRequest +The request message containing the containerd namespace. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | | +| driver | [common.ContainerDriver](#common.ContainerDriver) | | driver might be default "containerd" or "cri" | + + + + + + + + +### StatsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Stats](#machine.Stats) | repeated | | + + + + + + + + +### StopRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | + + + + + + + + +### StopResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| resp | [string](#string) | | | + + + + + + + + +### SystemStat + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| boot_time | [uint64](#uint64) | | | +| cpu_total | [CPUStat](#machine.CPUStat) | | | +| cpu | [CPUStat](#machine.CPUStat) | repeated | | +| irq_total | [uint64](#uint64) | | | +| irq | [uint64](#uint64) | repeated | | +| context_switches | [uint64](#uint64) | | | +| process_created | [uint64](#uint64) | | | +| process_running | [uint64](#uint64) | | | +| process_blocked | [uint64](#uint64) | | | +| soft_irq_total | [uint64](#uint64) | | | +| soft_irq | [SoftIRQStat](#machine.SoftIRQStat) | | | + + + + + + + + +### SystemStatResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [SystemStat](#machine.SystemStat) | repeated | | + + + + + + + + +### TaskEvent + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| task | [string](#string) | | | +| action | [TaskEvent.Action](#machine.TaskEvent.Action) | | | + + + + + + + + +### Upgrade + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| ack | [string](#string) | | | + + + + + + + + +### UpgradeRequest +rpc upgrade + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| image | [string](#string) | | | +| preserve | [bool](#bool) | | | +| stage | [bool](#bool) | | | +| force | [bool](#bool) | | | + + + + + + + + +### UpgradeResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Upgrade](#machine.Upgrade) | repeated | | + + + + + + + + +### Version + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| version | [VersionInfo](#machine.VersionInfo) | | | +| platform | [PlatformInfo](#machine.PlatformInfo) | | | +| features | [FeaturesInfo](#machine.FeaturesInfo) | | Features describe individual Talos features that can be switched on or off. | + + + + + + + + +### VersionInfo + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| tag | [string](#string) | | | +| sha | [string](#string) | | | +| built | [string](#string) | | | +| go_version | [string](#string) | | | +| os | [string](#string) | | | +| arch | [string](#string) | | | + + + + + + + + +### VersionResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Version](#machine.Version) | repeated | | + + + + + + + + + + +### ListRequest.Type +File type. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| REGULAR | 0 | Regular file (not directory, symlink, etc). | +| DIRECTORY | 1 | Directory. | +| SYMLINK | 2 | Symbolic link. | + + + + + +### MachineConfig.MachineType + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| TYPE_UNKNOWN | 0 | | +| TYPE_INIT | 1 | | +| TYPE_CONTROL_PLANE | 2 | | +| TYPE_JOIN | 3 | | + + + + + +### PhaseEvent.Action + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| START | 0 | | +| STOP | 1 | | + + + + + +### SequenceEvent.Action + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NOOP | 0 | | +| START | 1 | | +| STOP | 2 | | + + + + + +### ServiceStateEvent.Action + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| INITIALIZED | 0 | | +| PREPARING | 1 | | +| WAITING | 2 | | +| RUNNING | 3 | | +| STOPPING | 4 | | +| FINISHED | 5 | | +| FAILED | 6 | | +| SKIPPED | 7 | | + + + + + +### TaskEvent.Action + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| START | 0 | | +| STOP | 1 | | + + + + + + + + + +### MachineService +The machine service definition. + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| ApplyConfiguration | [ApplyConfigurationRequest](#machine.ApplyConfigurationRequest) | [ApplyConfigurationResponse](#machine.ApplyConfigurationResponse) | | +| Bootstrap | [BootstrapRequest](#machine.BootstrapRequest) | [BootstrapResponse](#machine.BootstrapResponse) | | +| Containers | [ContainersRequest](#machine.ContainersRequest) | [ContainersResponse](#machine.ContainersResponse) | | +| Copy | [CopyRequest](#machine.CopyRequest) | [.common.Data](#common.Data) stream | | +| CPUInfo | [.google.protobuf.Empty](#google.protobuf.Empty) | [CPUInfoResponse](#machine.CPUInfoResponse) | | +| DiskStats | [.google.protobuf.Empty](#google.protobuf.Empty) | [DiskStatsResponse](#machine.DiskStatsResponse) | | +| Dmesg | [DmesgRequest](#machine.DmesgRequest) | [.common.Data](#common.Data) stream | | +| Events | [EventsRequest](#machine.EventsRequest) | [Event](#machine.Event) stream | | +| EtcdMemberList | [EtcdMemberListRequest](#machine.EtcdMemberListRequest) | [EtcdMemberListResponse](#machine.EtcdMemberListResponse) | | +| EtcdRemoveMember | [EtcdRemoveMemberRequest](#machine.EtcdRemoveMemberRequest) | [EtcdRemoveMemberResponse](#machine.EtcdRemoveMemberResponse) | | +| EtcdLeaveCluster | [EtcdLeaveClusterRequest](#machine.EtcdLeaveClusterRequest) | [EtcdLeaveClusterResponse](#machine.EtcdLeaveClusterResponse) | | +| EtcdForfeitLeadership | [EtcdForfeitLeadershipRequest](#machine.EtcdForfeitLeadershipRequest) | [EtcdForfeitLeadershipResponse](#machine.EtcdForfeitLeadershipResponse) | | +| EtcdRecover | [.common.Data](#common.Data) stream | [EtcdRecoverResponse](#machine.EtcdRecoverResponse) | EtcdRecover method uploads etcd data snapshot created with EtcdSnapshot to the node. + +Snapshot can be later used to recover the cluster via Bootstrap method. | +| EtcdSnapshot | [EtcdSnapshotRequest](#machine.EtcdSnapshotRequest) | [.common.Data](#common.Data) stream | EtcdSnapshot method creates etcd data snapshot (backup) from the local etcd instance and streams it back to the client. + +This method is available only on control plane nodes (which run etcd). | +| GenerateConfiguration | [GenerateConfigurationRequest](#machine.GenerateConfigurationRequest) | [GenerateConfigurationResponse](#machine.GenerateConfigurationResponse) | | +| Hostname | [.google.protobuf.Empty](#google.protobuf.Empty) | [HostnameResponse](#machine.HostnameResponse) | | +| Kubeconfig | [.google.protobuf.Empty](#google.protobuf.Empty) | [.common.Data](#common.Data) stream | | +| List | [ListRequest](#machine.ListRequest) | [FileInfo](#machine.FileInfo) stream | | +| DiskUsage | [DiskUsageRequest](#machine.DiskUsageRequest) | [DiskUsageInfo](#machine.DiskUsageInfo) stream | | +| LoadAvg | [.google.protobuf.Empty](#google.protobuf.Empty) | [LoadAvgResponse](#machine.LoadAvgResponse) | | +| Logs | [LogsRequest](#machine.LogsRequest) | [.common.Data](#common.Data) stream | | +| Memory | [.google.protobuf.Empty](#google.protobuf.Empty) | [MemoryResponse](#machine.MemoryResponse) | | +| Mounts | [.google.protobuf.Empty](#google.protobuf.Empty) | [MountsResponse](#machine.MountsResponse) | | +| NetworkDeviceStats | [.google.protobuf.Empty](#google.protobuf.Empty) | [NetworkDeviceStatsResponse](#machine.NetworkDeviceStatsResponse) | | +| Processes | [.google.protobuf.Empty](#google.protobuf.Empty) | [ProcessesResponse](#machine.ProcessesResponse) | | +| Read | [ReadRequest](#machine.ReadRequest) | [.common.Data](#common.Data) stream | | +| Reboot | [.google.protobuf.Empty](#google.protobuf.Empty) | [RebootResponse](#machine.RebootResponse) | | +| Restart | [RestartRequest](#machine.RestartRequest) | [RestartResponse](#machine.RestartResponse) | | +| Rollback | [RollbackRequest](#machine.RollbackRequest) | [RollbackResponse](#machine.RollbackResponse) | | +| Reset | [ResetRequest](#machine.ResetRequest) | [ResetResponse](#machine.ResetResponse) | | +| RemoveBootkubeInitializedKey | [.google.protobuf.Empty](#google.protobuf.Empty) | [RemoveBootkubeInitializedKeyResponse](#machine.RemoveBootkubeInitializedKeyResponse) | | +| ServiceList | [.google.protobuf.Empty](#google.protobuf.Empty) | [ServiceListResponse](#machine.ServiceListResponse) | | +| ServiceRestart | [ServiceRestartRequest](#machine.ServiceRestartRequest) | [ServiceRestartResponse](#machine.ServiceRestartResponse) | | +| ServiceStart | [ServiceStartRequest](#machine.ServiceStartRequest) | [ServiceStartResponse](#machine.ServiceStartResponse) | | +| ServiceStop | [ServiceStopRequest](#machine.ServiceStopRequest) | [ServiceStopResponse](#machine.ServiceStopResponse) | | +| Shutdown | [.google.protobuf.Empty](#google.protobuf.Empty) | [ShutdownResponse](#machine.ShutdownResponse) | | +| Stats | [StatsRequest](#machine.StatsRequest) | [StatsResponse](#machine.StatsResponse) | | +| SystemStat | [.google.protobuf.Empty](#google.protobuf.Empty) | [SystemStatResponse](#machine.SystemStatResponse) | | +| Upgrade | [UpgradeRequest](#machine.UpgradeRequest) | [UpgradeResponse](#machine.UpgradeResponse) | | +| Version | [.google.protobuf.Empty](#google.protobuf.Empty) | [VersionResponse](#machine.VersionResponse) | | +| GenerateClientConfiguration | [GenerateClientConfigurationRequest](#machine.GenerateClientConfigurationRequest) | [GenerateClientConfigurationResponse](#machine.GenerateClientConfigurationResponse) | GenerateClientConfiguration generates talosctl client configuration (talosconfig). | + + + + + + +

Top

+ +## network/network.proto + + + + + +### Interface +Interface represents a net.Interface + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| index | [uint32](#uint32) | | | +| mtu | [uint32](#uint32) | | | +| name | [string](#string) | | | +| hardwareaddr | [string](#string) | | | +| flags | [InterfaceFlags](#network.InterfaceFlags) | | | +| ipaddress | [string](#string) | repeated | | + + + + + + + + +### Interfaces + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| interfaces | [Interface](#network.Interface) | repeated | | + + + + + + + + +### InterfacesResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Interfaces](#network.Interfaces) | repeated | | + + + + + + + + +### Route +The messages message containing a route. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| interface | [string](#string) | | Interface is the interface over which traffic to this destination should be sent | +| destination | [string](#string) | | Destination is the network prefix CIDR which this route provides | +| gateway | [string](#string) | | Gateway is the gateway address to which traffic to this destination should be sent | +| metric | [uint32](#uint32) | | Metric is the priority of the route, where lower metrics have higher priorities | +| scope | [uint32](#uint32) | | Scope desribes the scope of this route | +| source | [string](#string) | | Source is the source prefix CIDR for the route, if one is defined | +| family | [AddressFamily](#network.AddressFamily) | | Family is the address family of the route. Currently, the only options are AF_INET (IPV4) and AF_INET6 (IPV6). | +| protocol | [RouteProtocol](#network.RouteProtocol) | | Protocol is the protocol by which this route came to be in place | +| flags | [uint32](#uint32) | | Flags indicate any special flags on the route | + + + + + + + + +### Routes + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| routes | [Route](#network.Route) | repeated | | + + + + + + + + +### RoutesResponse +The messages message containing the routes. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Routes](#network.Routes) | repeated | | + + + + + + + + + + +### AddressFamily + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| AF_UNSPEC | 0 | | +| AF_INET | 2 | | +| IPV4 | 2 | | +| AF_INET6 | 10 | | +| IPV6 | 10 | | + + + + + +### InterfaceFlags + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| FLAG_UNKNOWN | 0 | | +| FLAG_UP | 1 | | +| FLAG_BROADCAST | 2 | | +| FLAG_LOOPBACK | 3 | | +| FLAG_POINT_TO_POINT | 4 | | +| FLAG_MULTICAST | 5 | | + + + + + +### RouteProtocol + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| RTPROT_UNSPEC | 0 | | +| RTPROT_REDIRECT | 1 | Route installed by ICMP redirects | +| RTPROT_KERNEL | 2 | Route installed by kernel | +| RTPROT_BOOT | 3 | Route installed during boot | +| RTPROT_STATIC | 4 | Route installed by administrator | +| RTPROT_GATED | 8 | Route installed by gated | +| RTPROT_RA | 9 | Route installed by router advertisement | +| RTPROT_MRT | 10 | Route installed by Merit MRT | +| RTPROT_ZEBRA | 11 | Route installed by Zebra/Quagga | +| RTPROT_BIRD | 12 | Route installed by Bird | +| RTPROT_DNROUTED | 13 | Route installed by DECnet routing daemon | +| RTPROT_XORP | 14 | Route installed by XORP | +| RTPROT_NTK | 15 | Route installed by Netsukuku | +| RTPROT_DHCP | 16 | Route installed by DHCP | +| RTPROT_MROUTED | 17 | Route installed by Multicast daemon | +| RTPROT_BABEL | 42 | Route installed by Babel daemon | + + + + + + + + + +### NetworkService +The network service definition. + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| Routes | [.google.protobuf.Empty](#google.protobuf.Empty) | [RoutesResponse](#network.RoutesResponse) | | +| Interfaces | [.google.protobuf.Empty](#google.protobuf.Empty) | [InterfacesResponse](#network.InterfacesResponse) | | + + + + + + +

Top

+ +## resource/resource.proto + + + + + +### Get +The GetResponse message contains the Resource returned. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| definition | [Resource](#resource.Resource) | | | +| resource | [Resource](#resource.Resource) | | | + + + + + + + + +### GetRequest +rpc Get + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | | +| type | [string](#string) | | | +| id | [string](#string) | | | + + + + + + + + +### GetResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Get](#resource.Get) | repeated | | + + + + + + + + +### ListRequest +rpc List +The ListResponse message contains the Resource returned. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | | +| type | [string](#string) | | | + + + + + + + + +### ListResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| definition | [Resource](#resource.Resource) | | | +| resource | [Resource](#resource.Resource) | | | + + + + + + + + +### Metadata + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | | +| type | [string](#string) | | | +| id | [string](#string) | | | +| version | [string](#string) | | | +| owner | [string](#string) | | | +| phase | [string](#string) | | | +| created | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| updated | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| finalizers | [string](#string) | repeated | | + + + + + + + + +### Resource + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [Metadata](#resource.Metadata) | | | +| spec | [Spec](#resource.Spec) | | | + + + + + + + + +### Spec + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| yaml | [bytes](#bytes) | | | + + + + + + + + +### WatchRequest +rpc Watch +The WatchResponse message contains the Resource returned. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | | +| type | [string](#string) | | | +| id | [string](#string) | | | +| tail_events | [uint32](#uint32) | | | + + + + + + + + +### WatchResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| event_type | [EventType](#resource.EventType) | | | +| definition | [Resource](#resource.Resource) | | | +| resource | [Resource](#resource.Resource) | | | + + + + + + + + + + +### EventType + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| CREATED | 0 | | +| UPDATED | 1 | | +| DESTROYED | 2 | | + + + + + + + + + +### ResourceService +The resource service definition. + +ResourceService provides user-facing API for the Talos resources. + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| Get | [GetRequest](#resource.GetRequest) | [GetResponse](#resource.GetResponse) | | +| List | [ListRequest](#resource.ListRequest) | [ListResponse](#resource.ListResponse) stream | | +| Watch | [WatchRequest](#resource.WatchRequest) | [WatchResponse](#resource.WatchResponse) stream | | + + + + + + +

Top

+ +## security/security.proto + + + + + +### CertificateRequest +The request message containing the process name. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| csr | [bytes](#bytes) | | | + + + + + + + + +### CertificateResponse +The response message containing the requested logs. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| ca | [bytes](#bytes) | | | +| crt | [bytes](#bytes) | | | + + + + + + + + + + + + + + +### SecurityService +The security service definition. + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| Certificate | [CertificateRequest](#securityapi.CertificateRequest) | [CertificateResponse](#securityapi.CertificateResponse) | | + + + + + + +

Top

+ +## storage/storage.proto + + + + + +### Disk +Disk represents a disk. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| size | [uint64](#uint64) | | Size indicates the disk size in bytes. | +| model | [string](#string) | | Model idicates the disk model. | +| device_name | [string](#string) | | DeviceName indicates the disk name (e.g. `sda`). | +| name | [string](#string) | | Name as in `/sys/block//device/name`. | +| serial | [string](#string) | | Serial as in `/sys/block//device/serial`. | +| modalias | [string](#string) | | Modalias as in `/sys/block//device/modalias`. | +| uuid | [string](#string) | | Uuid as in `/sys/block//device/uuid`. | +| wwid | [string](#string) | | Wwid as in `/sys/block//device/wwid`. | +| type | [Disk.DiskType](#storage.Disk.DiskType) | | Type is a type of the disk: nvme, ssd, hdd, sd card. | + + + + + + + + +### Disks +DisksResponse represents the response of the `Disks` RPC. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| disks | [Disk](#storage.Disk) | repeated | | + + + + + + + + +### DisksResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Disks](#storage.Disks) | repeated | | + + + + + + + + + + +### Disk.DiskType + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| UNKNOWN | 0 | | +| SSD | 1 | | +| HDD | 2 | | +| NVME | 3 | | +| SD | 4 | | + + + + + + + + + +### StorageService +StorageService represents the storage service. + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| Disks | [.google.protobuf.Empty](#google.protobuf.Empty) | [DisksResponse](#storage.DisksResponse) | | + + + + + + +

Top

+ +## time/time.proto + + + + + +### Time + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| metadata | [common.Metadata](#common.Metadata) | | | +| server | [string](#string) | | | +| localtime | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| remotetime | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | + + + + + + + + +### TimeRequest +The response message containing the ntp server + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| server | [string](#string) | | | + + + + + + + + +### TimeResponse +The response message containing the ntp server, time, and offset + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| messages | [Time](#time.Time) | repeated | | + + + + + + + + + + + + + + +### TimeService +The time service definition. + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| Time | [.google.protobuf.Empty](#google.protobuf.Empty) | [TimeResponse](#time.TimeResponse) | | +| TimeCheck | [TimeRequest](#time.TimeRequest) | [TimeResponse](#time.TimeResponse) | | + + + + + +## Scalar Value Types + +| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | +| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | +| double | | double | double | float | float64 | double | float | Float | +| float | | float | float | float | float32 | float | float | Float | +| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | +| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | +| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | +| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | +| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | +| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | +| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | + diff --git a/website/content/docs/v0.12/Reference/cli.md b/website/content/docs/v0.12/Reference/cli.md new file mode 100644 index 0000000000..07b5a1e88d --- /dev/null +++ b/website/content/docs/v0.12/Reference/cli.md @@ -0,0 +1,2216 @@ +--- +title: CLI +desription: Talosctl CLI tool reference. +--- + + + +## talosctl apply-config + +Apply a new configuration to a node + +``` +talosctl apply-config [flags] +``` + +### Options + +``` + --cert-fingerprint strings list of server certificate fingeprints to accept (defaults to no check) + -f, --file string the filename of the updated configuration + -h, --help help for apply-config + --immediate apply the config immediately (without a reboot) + -i, --insecure apply the config using the insecure (encrypted with no auth) maintenance service + --interactive apply the config using text based interactive mode + --on-reboot apply the config on reboot +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl bootstrap + +Bootstrap the etcd cluster on the specified node. + +### Synopsis + +When Talos cluster is created etcd service on control plane nodes enter the join loop waiting +to join etcd peers from other control plane nodes. One node should be picked as the boostrap node. +When boostrap command is issued, the node aborts join process and bootstraps etcd cluster as a single node cluster. +Other control plane nodes will join etcd cluster once Kubernetes is boostrapped on the bootstrap node. + +This command should not be used when "init" type node are used. + +Talos etcd cluster can be recovered from a known snapshot with '--recover-from=' flag. + +``` +talosctl bootstrap [flags] +``` + +### Options + +``` + -h, --help help for bootstrap + --recover-from string recover etcd cluster from the snapshot + --recover-skip-hash-check skip integrity check when recovering etcd (use when recovering from data directory copy) +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl cluster create + +Creates a local docker-based or QEMU-based kubernetes cluster + +``` +talosctl cluster create [flags] +``` + +### Options + +``` + --arch string cluster architecture (default "amd64") + --bad-rtc launch VM with bad RTC state (QEMU only) + --cidr string CIDR of the cluster network (IPv4, ULA network for IPv6 is derived in automated way) (default "10.5.0.0/24") + --cni-bin-path strings search path for CNI binaries (VM only) (default [/home/user/.talos/cni/bin]) + --cni-bundle-url string URL to download CNI bundle from (VM only) (default "https://github.com/talos-systems/talos/releases/download/v0.11.0-alpha.2/talosctl-cni-bundle-${ARCH}.tar.gz") + --cni-cache-dir string CNI cache directory path (VM only) (default "/home/user/.talos/cni/cache") + --cni-conf-dir string CNI config directory path (VM only) (default "/home/user/.talos/cni/conf.d") + --config-patch string patch generated machineconfigs (applied to all node types) + --config-patch-control-plane string patch generated machineconfigs (applied to 'init' and 'controlplane' types) + --config-patch-join string patch generated machineconfigs (applied to 'join' type) + --cpus string the share of CPUs as fraction (each container/VM) (default "2.0") + --crashdump print debug crashdump to stderr when cluster startup fails + --custom-cni-url string install custom CNI from the URL (Talos cluster) + --disk int default limit on disk size in MB (each VM) (default 6144) + --disk-image-path string disk image to use + --dns-domain string the dns domain to use for cluster (default "cluster.local") + --docker-host-ip string Host IP to forward exposed ports to (Docker provisioner only) (default "0.0.0.0") + --encrypt-ephemeral enable ephemeral partition encryption + --encrypt-state enable state partition encryption + --endpoint string use endpoint instead of provider defaults + -p, --exposed-ports string Comma-separated list of ports/protocols to expose on init node. Ex -p :/ (Docker provisioner only) + -h, --help help for create + --image string the image to use (default "ghcr.io/talos-systems/talos:latest") + --init-node-as-endpoint use init node as endpoint instead of any load balancer endpoint + --initrd-path string initramfs image to use (default "_out/initramfs-${ARCH}.xz") + -i, --input-dir string location of pre-generated config files + --install-image string the installer image to use (default "ghcr.io/talos-systems/installer:latest") + --ipv4 enable IPv4 network in the cluster (default true) + --ipv6 enable IPv6 network in the cluster (QEMU provisioner only) + --iso-path string the ISO path to use for the initial boot (VM only) + --kubernetes-version string desired kubernetes version to run (default "1.21.2") + --masters int the number of masters to create (default 1) + --memory int the limit on memory usage in MB (each container/VM) (default 2048) + --mtu int MTU of the cluster network (default 1500) + --nameservers strings list of nameservers to use (default [8.8.8.8,1.1.1.1,2001:4860:4860::8888,2606:4700:4700::1111]) + --registry-insecure-skip-verify strings list of registry hostnames to skip TLS verification for + --registry-mirror strings list of registry mirrors to use in format: = + --skip-injecting-config skip injecting config from embedded metadata server, write config files to current directory + --skip-kubeconfig skip merging kubeconfig from the created cluster + --talos-version string the desired Talos version to generate config for (if not set, defaults to image version) + --use-vip use a virtual IP for the controlplane endpoint instead of the loadbalancer + --user-disk strings list of disks to create for each VM in format: ::: + --vmlinuz-path string the compressed kernel image to use (default "_out/vmlinuz-${ARCH}") + --wait wait for the cluster to be ready before returning (default true) + --wait-timeout duration timeout to wait for the cluster to be ready (default 20m0s) + --wireguard-cidr string CIDR of the wireguard network + --with-apply-config enable apply config when the VM is starting in maintenance mode + --with-bootloader enable bootloader to load kernel and initramfs from disk image after install (default true) + --with-debug enable debug in Talos config to send service logs to the console + --with-init-node create the cluster with an init node + --with-uefi enable UEFI on x86_64 architecture (always enabled for arm64) + --workers int the number of workers to create (default 1) +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + --name string the name of the cluster (default "talos-default") + -n, --nodes strings target the specified nodes + --provisioner string Talos cluster provisioner to use (default "docker") + --state string directory path to store cluster state (default "/home/user/.talos/clusters") + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl cluster](#talosctl-cluster) - A collection of commands for managing local docker-based or firecracker-based clusters + +## talosctl cluster destroy + +Destroys a local docker-based or firecracker-based kubernetes cluster + +``` +talosctl cluster destroy [flags] +``` + +### Options + +``` + -h, --help help for destroy +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + --name string the name of the cluster (default "talos-default") + -n, --nodes strings target the specified nodes + --provisioner string Talos cluster provisioner to use (default "docker") + --state string directory path to store cluster state (default "/home/user/.talos/clusters") + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl cluster](#talosctl-cluster) - A collection of commands for managing local docker-based or firecracker-based clusters + +## talosctl cluster show + +Shows info about a local provisioned kubernetes cluster + +``` +talosctl cluster show [flags] +``` + +### Options + +``` + -h, --help help for show +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + --name string the name of the cluster (default "talos-default") + -n, --nodes strings target the specified nodes + --provisioner string Talos cluster provisioner to use (default "docker") + --state string directory path to store cluster state (default "/home/user/.talos/clusters") + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl cluster](#talosctl-cluster) - A collection of commands for managing local docker-based or firecracker-based clusters + +## talosctl cluster + +A collection of commands for managing local docker-based or firecracker-based clusters + +### Options + +``` + -h, --help help for cluster + --name string the name of the cluster (default "talos-default") + --provisioner string Talos cluster provisioner to use (default "docker") + --state string directory path to store cluster state (default "/home/user/.talos/clusters") +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos +* [talosctl cluster create](#talosctl-cluster-create) - Creates a local docker-based or QEMU-based kubernetes cluster +* [talosctl cluster destroy](#talosctl-cluster-destroy) - Destroys a local docker-based or firecracker-based kubernetes cluster +* [talosctl cluster show](#talosctl-cluster-show) - Shows info about a local provisioned kubernetes cluster + +## talosctl completion + +Output shell completion code for the specified shell (bash or zsh) + +### Synopsis + +Output shell completion code for the specified shell (bash or zsh). +The shell code must be evaluated to provide interactive +completion of talosctl commands. This can be done by sourcing it from +the .bash_profile. + +Note for zsh users: [1] zsh completions are only supported in versions of zsh >= 5.2 + +``` +talosctl completion SHELL [flags] +``` + +### Examples + +``` +# Installing bash completion on macOS using homebrew +## If running Bash 3.2 included with macOS + brew install bash-completion +## or, if running Bash 4.1+ + brew install bash-completion@2 +## If talosctl is installed via homebrew, this should start working immediately. +## If you've installed via other means, you may need add the completion to your completion directory + talosctl completion bash > $(brew --prefix)/etc/bash_completion.d/talosctl + +# Installing bash completion on Linux +## If bash-completion is not installed on Linux, please install the 'bash-completion' package +## via your distribution's package manager. +## Load the talosctl completion code for bash into the current shell + source <(talosctl completion bash) +## Write bash completion code to a file and source if from .bash_profile + talosctl completion bash > ~/.talos/completion.bash.inc + printf " + # talosctl shell completion + source '$HOME/.talos/completion.bash.inc' + " >> $HOME/.bash_profile + source $HOME/.bash_profile +# Load the talosctl completion code for zsh[1] into the current shell + source <(talosctl completion zsh) +# Set the talosctl completion code for zsh[1] to autoload on startup +talosctl completion zsh > "${fpath[1]}/_talosctl" +``` + +### Options + +``` + -h, --help help for completion +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl config add + +Add a new context + +``` +talosctl config add [flags] +``` + +### Options + +``` + --ca string the path to the CA certificate + --crt string the path to the certificate + -h, --help help for add + --key string the path to the key +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl config](#talosctl-config) - Manage the client configuration file (talosconfig) + +## talosctl config context + +Set the current context + +``` +talosctl config context [flags] +``` + +### Options + +``` + -h, --help help for context +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl config](#talosctl-config) - Manage the client configuration file (talosconfig) + +## talosctl config contexts + +List defined contexts + +``` +talosctl config contexts [flags] +``` + +### Options + +``` + -h, --help help for contexts +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl config](#talosctl-config) - Manage the client configuration file (talosconfig) + +## talosctl config endpoint + +Set the endpoint(s) for the current context + +``` +talosctl config endpoint ... [flags] +``` + +### Options + +``` + -h, --help help for endpoint +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl config](#talosctl-config) - Manage the client configuration file (talosconfig) + +## talosctl config info + +Show information about the current context + +``` +talosctl config info [flags] +``` + +### Options + +``` + -h, --help help for info +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl config](#talosctl-config) - Manage the client configuration file (talosconfig) + +## talosctl config merge + +Merge additional contexts from another client configuration file + +### Synopsis + +Contexts with the same name are renamed while merging configs. + +``` +talosctl config merge [flags] +``` + +### Options + +``` + -h, --help help for merge +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl config](#talosctl-config) - Manage the client configuration file (talosconfig) + +## talosctl config new + +Generate a new client configuration file + +``` +talosctl config new [] [flags] +``` + +### Options + +``` + --crt-ttl duration certificate TTL (default 87600h0m0s) + -h, --help help for new + --roles strings roles (default [os:admin]) +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl config](#talosctl-config) - Manage the client configuration file (talosconfig) + +## talosctl config node + +Set the node(s) for the current context + +``` +talosctl config node ... [flags] +``` + +### Options + +``` + -h, --help help for node +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl config](#talosctl-config) - Manage the client configuration file (talosconfig) + +## talosctl config + +Manage the client configuration file (talosconfig) + +### Options + +``` + -h, --help help for config +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos +* [talosctl config add](#talosctl-config-add) - Add a new context +* [talosctl config context](#talosctl-config-context) - Set the current context +* [talosctl config contexts](#talosctl-config-contexts) - List defined contexts +* [talosctl config endpoint](#talosctl-config-endpoint) - Set the endpoint(s) for the current context +* [talosctl config info](#talosctl-config-info) - Show information about the current context +* [talosctl config merge](#talosctl-config-merge) - Merge additional contexts from another client configuration file +* [talosctl config new](#talosctl-config-new) - Generate a new client configuration file +* [talosctl config node](#talosctl-config-node) - Set the node(s) for the current context + +## talosctl conformance kubernetes + +Run Kubernetes conformance tests + +``` +talosctl conformance kubernetes [flags] +``` + +### Options + +``` + -h, --help help for kubernetes + --mode string conformance test mode: [fast, certified] (default "fast") +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl conformance](#talosctl-conformance) - Run conformance tests + +## talosctl conformance + +Run conformance tests + +### Options + +``` + -h, --help help for conformance +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos +* [talosctl conformance kubernetes](#talosctl-conformance-kubernetes) - Run Kubernetes conformance tests + +## talosctl containers + +List containers + +``` +talosctl containers [flags] +``` + +### Options + +``` + -h, --help help for containers + -k, --kubernetes use the k8s.io containerd namespace +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl convert-k8s + +Convert Kubernetes control plane from self-hosted (bootkube) to Talos-managed (static pods). + +### Synopsis + +Command converts control plane bootstrapped on Talos <= 0.8 to Talos-managed control plane (Talos >= 0.9). +As part of the conversion process tool reads existing configuration of the control plane, updates +Talos node configuration to reflect changes made since the boostrap time. Once config is updated, +tool releases static pods and deletes self-hosted DaemonSets. + +``` +talosctl convert-k8s [flags] +``` + +### Options + +``` + --endpoint string the cluster control plane endpoint + --force skip prompts, assume yes + -h, --help help for convert-k8s +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl copy + +Copy data out from the node + +### Synopsis + +Creates an .tar.gz archive at the node starting at and +streams it back to the client. + +If '-' is given for , archive is written to stdout. +Otherwise archive is extracted to which should be an empty directory or +talosctl creates a directory if doesn't exist. Command doesn't preserve +ownership and access mode for the files in extract mode, while streamed .tar archive +captures ownership and permission bits. + +``` +talosctl copy -| [flags] +``` + +### Options + +``` + -h, --help help for copy +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl crashdump + +Dump debug information about the cluster + +``` +talosctl crashdump [flags] +``` + +### Options + +``` + --control-plane-nodes strings specify IPs of control plane nodes + -h, --help help for crashdump + --init-node string specify IPs of init node + --worker-nodes strings specify IPs of worker nodes +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl dashboard + +Cluster dashboard with real-time metrics + +### Synopsis + +Provide quick UI to navigate through node real-time metrics. + +Keyboard shortcuts: + + - h, : switch one node to the left + - l, : switch one node to the right + - j, : scroll process list down + - k, : scroll process list up + - : scroll process list half page down + - : scroll process list half page up + - : scroll process list one page down + - : scroll process list one page up + + +``` +talosctl dashboard [flags] +``` + +### Options + +``` + -h, --help help for dashboard + -d, --update-interval duration interval between updates (default 3s) +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl disks + +Get the list of disks from /sys/block on the machine + +``` +talosctl disks [flags] +``` + +### Options + +``` + -h, --help help for disks + -i, --insecure get disks using the insecure (encrypted with no auth) maintenance service +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl dmesg + +Retrieve kernel logs + +``` +talosctl dmesg [flags] +``` + +### Options + +``` + -f, --follow specify if the kernel log should be streamed + -h, --help help for dmesg + --tail specify if only new messages should be sent (makes sense only when combined with --follow) +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl edit + +Edit a resource from the default editor. + +### Synopsis + +The edit command allows you to directly edit any API resource +you can retrieve via the command line tools. + +It will open the editor defined by your TALOS_EDITOR, +or EDITOR environment variables, or fall back to 'vi' for Linux +or 'notepad' for Windows. + +``` +talosctl edit [] [flags] +``` + +### Options + +``` + -h, --help help for edit + --immediate apply the change immediately (without a reboot) + --namespace string resource namespace (default is to use default namespace per resource) + --on-reboot apply the change on next reboot +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl etcd forfeit-leadership + +Tell node to forfeit etcd cluster leadership + +``` +talosctl etcd forfeit-leadership [flags] +``` + +### Options + +``` + -h, --help help for forfeit-leadership +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl etcd](#talosctl-etcd) - Manage etcd + +## talosctl etcd leave + +Tell nodes to leave etcd cluster + +``` +talosctl etcd leave [flags] +``` + +### Options + +``` + -h, --help help for leave +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl etcd](#talosctl-etcd) - Manage etcd + +## talosctl etcd members + +Get the list of etcd cluster members + +``` +talosctl etcd members [flags] +``` + +### Options + +``` + -h, --help help for members +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl etcd](#talosctl-etcd) - Manage etcd + +## talosctl etcd remove-member + +Remove the node from etcd cluster + +### Synopsis + +Use this command only if you want to remove a member which is in broken state. +If there is no access to the node, or the node can't access etcd to call etcd leave. +Always prefer etcd leave over this command. + +``` +talosctl etcd remove-member [flags] +``` + +### Options + +``` + -h, --help help for remove-member +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl etcd](#talosctl-etcd) - Manage etcd + +## talosctl etcd snapshot + +Stream snapshot of the etcd node to the path. + +``` +talosctl etcd snapshot [flags] +``` + +### Options + +``` + -h, --help help for snapshot +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl etcd](#talosctl-etcd) - Manage etcd + +## talosctl etcd + +Manage etcd + +### Options + +``` + -h, --help help for etcd +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos +* [talosctl etcd forfeit-leadership](#talosctl-etcd-forfeit-leadership) - Tell node to forfeit etcd cluster leadership +* [talosctl etcd leave](#talosctl-etcd-leave) - Tell nodes to leave etcd cluster +* [talosctl etcd members](#talosctl-etcd-members) - Get the list of etcd cluster members +* [talosctl etcd remove-member](#talosctl-etcd-remove-member) - Remove the node from etcd cluster +* [talosctl etcd snapshot](#talosctl-etcd-snapshot) - Stream snapshot of the etcd node to the path. + +## talosctl events + +Stream runtime events + +``` +talosctl events [flags] +``` + +### Options + +``` + --duration duration show events for the past duration interval (one second resolution, default is to show no history) + -h, --help help for events + --since string show events after the specified event ID (default is to show no history) + --tail int32 show specified number of past events (use -1 to show full history, default is to show no history) +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl gen ca + +Generates a self-signed X.509 certificate authority + +``` +talosctl gen ca [flags] +``` + +### Options + +``` + -h, --help help for ca + --hours int the hours from now on which the certificate validity period ends (default 87600) + --organization string X.509 distinguished name for the Organization + --rsa generate in RSA format +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl gen](#talosctl-gen) - Generate CAs, certificates, and private keys + +## talosctl gen config + +Generates a set of configuration files for Talos cluster + +### Synopsis + +The cluster endpoint is the URL for the Kubernetes API. If you decide to use +a control plane node, common in a single node control plane setup, use port 6443 as +this is the port that the API server binds to on every control plane node. For an HA +setup, usually involving a load balancer, use the IP and port of the load balancer. + +``` +talosctl gen config [flags] +``` + +### Options + +``` + --additional-sans strings additional Subject-Alt-Names for the APIServer certificate + --config-patch string patch generated machineconfigs (applied to all node types) + --config-patch-control-plane string patch generated machineconfigs (applied to 'init' and 'controlplane' types) + --config-patch-join string patch generated machineconfigs (applied to 'join' type) + --dns-domain string the dns domain to use for cluster (default "cluster.local") + -h, --help help for config + --install-disk string the disk to install to (default "/dev/sda") + --install-image string the image used to perform an installation (default "ghcr.io/talos-systems/installer:latest") + --kubernetes-version string desired kubernetes version to run + -o, --output-dir string destination to output generated files + -p, --persist the desired persist value for configs (default true) + --registry-mirror strings list of registry mirrors to use in format: = + --talos-version string the desired Talos version to generate config for (backwards compatibility, e.g. v0.8) + --version string the desired machine config version to generate (default "v1alpha1") + --with-docs renders all machine configs adding the documentation for each field (default true) + --with-examples renders all machine configs with the commented examples (default true) +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl gen](#talosctl-gen) - Generate CAs, certificates, and private keys + +## talosctl gen crt + +Generates an X.509 Ed25519 certificate + +``` +talosctl gen crt [flags] +``` + +### Options + +``` + --ca string path to the PEM encoded CERTIFICATE + --csr string path to the PEM encoded CERTIFICATE REQUEST + -h, --help help for crt + --hours int the hours from now on which the certificate validity period ends (default 24) + --name string the basename of the generated file +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl gen](#talosctl-gen) - Generate CAs, certificates, and private keys + +## talosctl gen csr + +Generates a CSR using an Ed25519 private key + +``` +talosctl gen csr [flags] +``` + +### Options + +``` + -h, --help help for csr + --ip string generate the certificate for this IP address + --key string path to the PEM encoded EC or RSA PRIVATE KEY + --roles strings roles (default [os:admin]) +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl gen](#talosctl-gen) - Generate CAs, certificates, and private keys + +## talosctl gen key + +Generates an Ed25519 private key + +``` +talosctl gen key [flags] +``` + +### Options + +``` + -h, --help help for key + --name string the basename of the generated file +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl gen](#talosctl-gen) - Generate CAs, certificates, and private keys + +## talosctl gen keypair + +Generates an X.509 Ed25519 key pair + +``` +talosctl gen keypair [flags] +``` + +### Options + +``` + -h, --help help for keypair + --ip string generate the certificate for this IP address + --organization string X.509 distinguished name for the Organization +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl gen](#talosctl-gen) - Generate CAs, certificates, and private keys + +## talosctl gen + +Generate CAs, certificates, and private keys + +### Options + +``` + -h, --help help for gen +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos +* [talosctl gen ca](#talosctl-gen-ca) - Generates a self-signed X.509 certificate authority +* [talosctl gen config](#talosctl-gen-config) - Generates a set of configuration files for Talos cluster +* [talosctl gen crt](#talosctl-gen-crt) - Generates an X.509 Ed25519 certificate +* [talosctl gen csr](#talosctl-gen-csr) - Generates a CSR using an Ed25519 private key +* [talosctl gen key](#talosctl-gen-key) - Generates an Ed25519 private key +* [talosctl gen keypair](#talosctl-gen-keypair) - Generates an X.509 Ed25519 key pair + +## talosctl get + +Get a specific resource or list of resources. + +``` +talosctl get [] [flags] +``` + +### Options + +``` + -h, --help help for get + --namespace string resource namespace (default is to use default namespace per resource) + -o, --output string output mode (table, yaml) (default "table") + -w, --watch watch resource changes +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl health + +Check cluster health + +``` +talosctl health [flags] +``` + +### Options + +``` + --control-plane-nodes strings specify IPs of control plane nodes + -h, --help help for health + --init-node string specify IPs of init node + --k8s-endpoint string use endpoint instead of kubeconfig default + --run-e2e run Kubernetes e2e test + --server run server-side check (default true) + --wait-timeout duration timeout to wait for the cluster to be ready (default 20m0s) + --worker-nodes strings specify IPs of worker nodes +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl images + +List the default images used by Talos + +``` +talosctl images [flags] +``` + +### Options + +``` + -h, --help help for images +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl inspect dependencies + +Inspect controller-resource dependencies as graphviz graph. + +### Synopsis + +Inspect controller-resource dependencies as graphviz graph. + +Pipe the output of the command through the "dot" program (part of graphviz package) +to render the graph: + + talosctl inspect dependencies | dot -Tpng > graph.png + + +``` +talosctl inspect dependencies [flags] +``` + +### Options + +``` + -h, --help help for dependencies + --with-resources display live resource information with dependencies +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl inspect](#talosctl-inspect) - Inspect internals of Talos + +## talosctl inspect + +Inspect internals of Talos + +### Options + +``` + -h, --help help for inspect +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos +* [talosctl inspect dependencies](#talosctl-inspect-dependencies) - Inspect controller-resource dependencies as graphviz graph. + +## talosctl interfaces + +List network interfaces + +``` +talosctl interfaces [flags] +``` + +### Options + +``` + -h, --help help for interfaces +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl kubeconfig + +Download the admin kubeconfig from the node + +### Synopsis + +Download the admin kubeconfig from the node. +If merge flag is defined, config will be merged with ~/.kube/config or [local-path] if specified. +Otherwise kubeconfig will be written to PWD or [local-path] if specified. + +``` +talosctl kubeconfig [local-path] [flags] +``` + +### Options + +``` + -f, --force Force overwrite of kubeconfig if already present, force overwrite on kubeconfig merge + --force-context-name string Force context name for kubeconfig merge + -h, --help help for kubeconfig + -m, --merge Merge with existing kubeconfig (default true) +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl list + +Retrieve a directory listing + +``` +talosctl list [path] [flags] +``` + +### Options + +``` + -d, --depth int32 maximum recursion depth + -h, --help help for list + -H, --humanize humanize size and time in the output + -l, --long display additional file details + -r, --recurse recurse into subdirectories + -t, --type strings filter by specified types: + f regular file + d directory + l, L symbolic link +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl logs + +Retrieve logs for a service + +``` +talosctl logs [flags] +``` + +### Options + +``` + -f, --follow specify if the logs should be streamed + -h, --help help for logs + -k, --kubernetes use the k8s.io containerd namespace + --tail int32 lines of log file to display (default is to show from the beginning) (default -1) +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl memory + +Show memory usage + +``` +talosctl memory [flags] +``` + +### Options + +``` + -h, --help help for memory + -v, --verbose display extended memory statistics +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl mounts + +List mounts + +``` +talosctl mounts [flags] +``` + +### Options + +``` + -h, --help help for mounts +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl patch + +Update field(s) of a resource using a JSON patch. + +``` +talosctl patch [] [flags] +``` + +### Options + +``` + -h, --help help for patch + --immediate apply the change immediately (without a reboot) + --namespace string resource namespace (default is to use default namespace per resource) + --on-reboot apply the change on next reboot + -p, --patch string the patch to be applied to the resource file. + --patch-file string a file containing a patch to be applied to the resource. +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl processes + +List running processes + +``` +talosctl processes [flags] +``` + +### Options + +``` + -h, --help help for processes + -s, --sort string Column to sort output by. [rss|cpu] (default "rss") + -w, --watch Stream running processes +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl read + +Read a file on the machine + +``` +talosctl read [flags] +``` + +### Options + +``` + -h, --help help for read +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl reboot + +Reboot a node + +``` +talosctl reboot [flags] +``` + +### Options + +``` + -h, --help help for reboot +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl reset + +Reset a node + +``` +talosctl reset [flags] +``` + +### Options + +``` + --graceful if true, attempt to cordon/drain node and leave etcd (if applicable) (default true) + -h, --help help for reset + --reboot if true, reboot the node after resetting instead of shutting down + --system-labels-to-wipe strings if set, just wipe selected system disk partitions by label but keep other partitions intact +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl restart + +Restart a process + +``` +talosctl restart [flags] +``` + +### Options + +``` + -h, --help help for restart + -k, --kubernetes use the k8s.io containerd namespace +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl rollback + +Rollback a node to the previous installation + +``` +talosctl rollback [flags] +``` + +### Options + +``` + -h, --help help for rollback +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl routes + +List network routes + +``` +talosctl routes [flags] +``` + +### Options + +``` + -h, --help help for routes +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl service + +Retrieve the state of a service (or all services), control service state + +### Synopsis + +Service control command. If run without arguments, lists all the services and their state. +If service ID is specified, default action 'status' is executed which shows status of a single list service. +With actions 'start', 'stop', 'restart', service state is updated respectively. + +``` +talosctl service [ [start|stop|restart|status]] [flags] +``` + +### Options + +``` + -h, --help help for service +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl shutdown + +Shutdown a node + +``` +talosctl shutdown [flags] +``` + +### Options + +``` + -h, --help help for shutdown +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl stats + +Get container stats + +``` +talosctl stats [flags] +``` + +### Options + +``` + -h, --help help for stats + -k, --kubernetes use the k8s.io containerd namespace +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl time + +Gets current server time + +``` +talosctl time [--check server] [flags] +``` + +### Options + +``` + -c, --check string checks server time against specified ntp server + -h, --help help for time +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl upgrade + +Upgrade Talos on the target node + +``` +talosctl upgrade [flags] +``` + +### Options + +``` + -f, --force force the upgrade (skip checks on etcd health and members, might lead to data loss) + -h, --help help for upgrade + -i, --image string the container image to use for performing the install + -p, --preserve preserve data + -s, --stage stage the upgrade to perform it after a reboot +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl upgrade-k8s + +Upgrade Kubernetes control plane in the Talos cluster. + +### Synopsis + +Command runs upgrade of Kubernetes control plane components between specified versions. Pod-checkpointer is handled in a special way to speed up kube-apisever upgrades. + +``` +talosctl upgrade-k8s [flags] +``` + +### Options + +``` + --endpoint string the cluster control plane endpoint + --from string the Kubernetes control plane version to upgrade from + -h, --help help for upgrade-k8s + --to string the Kubernetes control plane version to upgrade to (default "1.21.2") +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl usage + +Retrieve a disk usage + +``` +talosctl usage [path1] [path2] ... [pathN] [flags] +``` + +### Options + +``` + -a, --all write counts for all files, not just directories + -d, --depth int32 maximum recursion depth + -h, --help help for usage + -H, --humanize humanize size and time in the output + -t, --threshold int threshold exclude entries smaller than SIZE if positive, or entries greater than SIZE if negative +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl validate + +Validate config + +``` +talosctl validate [flags] +``` + +### Options + +``` + -c, --config string the path of the config file + -h, --help help for validate + -m, --mode string the mode to validate the config for (valid values are metal, cloud, and container) + --strict treat validation warnings as errors +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl version + +Prints the version + +``` +talosctl version [flags] +``` + +### Options + +``` + --client Print client version only + -h, --help help for version + --short Print the short version +``` + +### Options inherited from parent commands + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl](#talosctl) - A CLI for out-of-band management of Kubernetes nodes created by Talos + +## talosctl + +A CLI for out-of-band management of Kubernetes nodes created by Talos + +### Options + +``` + --context string Context to be used in command + -e, --endpoints strings override default endpoints in Talos configuration + -h, --help help for talosctl + -n, --nodes strings target the specified nodes + --talosconfig string The path to the Talos configuration file (default "/home/user/.talos/config") +``` + +### SEE ALSO + +* [talosctl apply-config](#talosctl-apply-config) - Apply a new configuration to a node +* [talosctl bootstrap](#talosctl-bootstrap) - Bootstrap the etcd cluster on the specified node. +* [talosctl cluster](#talosctl-cluster) - A collection of commands for managing local docker-based or firecracker-based clusters +* [talosctl completion](#talosctl-completion) - Output shell completion code for the specified shell (bash or zsh) +* [talosctl config](#talosctl-config) - Manage the client configuration file (talosconfig) +* [talosctl conformance](#talosctl-conformance) - Run conformance tests +* [talosctl containers](#talosctl-containers) - List containers +* [talosctl convert-k8s](#talosctl-convert-k8s) - Convert Kubernetes control plane from self-hosted (bootkube) to Talos-managed (static pods). +* [talosctl copy](#talosctl-copy) - Copy data out from the node +* [talosctl crashdump](#talosctl-crashdump) - Dump debug information about the cluster +* [talosctl dashboard](#talosctl-dashboard) - Cluster dashboard with real-time metrics +* [talosctl disks](#talosctl-disks) - Get the list of disks from /sys/block on the machine +* [talosctl dmesg](#talosctl-dmesg) - Retrieve kernel logs +* [talosctl edit](#talosctl-edit) - Edit a resource from the default editor. +* [talosctl etcd](#talosctl-etcd) - Manage etcd +* [talosctl events](#talosctl-events) - Stream runtime events +* [talosctl gen](#talosctl-gen) - Generate CAs, certificates, and private keys +* [talosctl get](#talosctl-get) - Get a specific resource or list of resources. +* [talosctl health](#talosctl-health) - Check cluster health +* [talosctl images](#talosctl-images) - List the default images used by Talos +* [talosctl inspect](#talosctl-inspect) - Inspect internals of Talos +* [talosctl interfaces](#talosctl-interfaces) - List network interfaces +* [talosctl kubeconfig](#talosctl-kubeconfig) - Download the admin kubeconfig from the node +* [talosctl list](#talosctl-list) - Retrieve a directory listing +* [talosctl logs](#talosctl-logs) - Retrieve logs for a service +* [talosctl memory](#talosctl-memory) - Show memory usage +* [talosctl mounts](#talosctl-mounts) - List mounts +* [talosctl patch](#talosctl-patch) - Update field(s) of a resource using a JSON patch. +* [talosctl processes](#talosctl-processes) - List running processes +* [talosctl read](#talosctl-read) - Read a file on the machine +* [talosctl reboot](#talosctl-reboot) - Reboot a node +* [talosctl reset](#talosctl-reset) - Reset a node +* [talosctl restart](#talosctl-restart) - Restart a process +* [talosctl rollback](#talosctl-rollback) - Rollback a node to the previous installation +* [talosctl routes](#talosctl-routes) - List network routes +* [talosctl service](#talosctl-service) - Retrieve the state of a service (or all services), control service state +* [talosctl shutdown](#talosctl-shutdown) - Shutdown a node +* [talosctl stats](#talosctl-stats) - Get container stats +* [talosctl time](#talosctl-time) - Gets current server time +* [talosctl upgrade](#talosctl-upgrade) - Upgrade Talos on the target node +* [talosctl upgrade-k8s](#talosctl-upgrade-k8s) - Upgrade Kubernetes control plane in the Talos cluster. +* [talosctl usage](#talosctl-usage) - Retrieve a disk usage +* [talosctl validate](#talosctl-validate) - Validate config +* [talosctl version](#talosctl-version) - Prints the version + diff --git a/website/content/docs/v0.12/Reference/configuration.md b/website/content/docs/v0.12/Reference/configuration.md new file mode 100644 index 0000000000..3f9d62ee90 --- /dev/null +++ b/website/content/docs/v0.12/Reference/configuration.md @@ -0,0 +1,5140 @@ +--- +title: Configuration +desription: Talos node configuration file reference. +--- + + + + + + +Package v1alpha1 configuration file contains all the options available for configuring a machine. + +To generate a set of basic configuration files, run: +```bash +talosctl gen config --version v1alpha1 +```` + +This will generate a machine config for each node type, and a talosconfig for the CLI. + +## Config +Config defines the v1alpha1 configuration file. + + + +``` yaml +version: v1alpha1 +persist: true +machine: # ... +cluster: # ... +``` + +
+ +
+ +version string + +
+
+ +Indicates the schema used to decode the contents. + + +Valid values: + + + - v1alpha1 +
+ +
+ +
+ +debug bool + +
+
+ +Enable verbose logging to the console. +All system containers logs will flow into serial console. + +> Note: To avoid breaking Talos bootstrap flow enable this option only if serial console can handle high message throughput. + + +Valid values: + + + - true + + - yes + + - false + + - no +
+ +
+ +
+ +persist bool + +
+
+ +Indicates whether to pull the machine config upon every boot. + + +Valid values: + + + - true + + - yes + + - false + + - no +
+ +
+ +
+
+ +Provides machine specific configuration options. + +
+ +
+ +
+ +cluster ClusterConfig + +
+
+ +Provides cluster specific configuration options. + +
+ +
+ + + + + +## MachineConfig +MachineConfig represents the machine-specific config values. + +Appears in: + + +- Config.machine + + +``` yaml +type: controlplane +# InstallConfig represents the installation options for preparing a node. +install: + disk: /dev/sda # The disk used for installations. + # Allows for supplying extra kernel args via the bootloader. + extraKernelArgs: + - console=ttyS1 + - panic=10 + image: ghcr.io/talos-systems/installer:latest # Allows for supplying the image used to perform the installation. + bootloader: true # Indicates if a bootloader should be installed. + wipe: false # Indicates if the installation disk should be wiped at installation time. + + # # Look up disk using disk characteristics like model, size, serial and others. + # diskSelector: + # size: 4GB # Disk size. + # model: WDC* # Disk model `/sys/block//device/model`. +``` + +
+ +
+ +type string + +
+
+ +Defines the role of the machine within the cluster. + +#### Init + +Init node type designates the first control plane node to come up. +You can think of it like a bootstrap node. +This node will perform the initial steps to bootstrap the cluster -- generation of TLS assets, starting of the control plane, etc. + +#### Control Plane + +Control Plane node type designates the node as a control plane member. +This means it will host etcd along with the Kubernetes master components such as API Server, Controller Manager, Scheduler. + +#### Worker + +Worker node type designates the node as a worker node. +This means it will be an available compute node for scheduling workloads. + + +Valid values: + + + - init + + - controlplane + + - join +
+ +
+ +
+ +token string + +
+
+ +The `token` is used by a machine to join the PKI of the cluster. +Using this token, a machine will create a certificate signing request (CSR), and request a certificate that will be used as its' identity. + + +> Warning: It is important to ensure that this token is correct since a machine's certificate has a short TTL by default. + + + +Examples: + + +``` yaml +token: 328hom.uqjzh6jnn2eie9oi +``` + + +
+ +
+ +
+ +ca PEMEncodedCertificateAndKey + +
+
+ +The root certificate authority of the PKI. +It is composed of a base64 encoded `crt` and `key`. + + + +Examples: + + +``` yaml +ca: + crt: TFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVSklla05DTUhGLi4u + key: TFMwdExTMUNSVWRKVGlCRlJESTFOVEU1SUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLVFVNLi4u +``` + + +
+ +
+ +
+ +certSANs []string + +
+
+ +Extra certificate subject alternative names for the machine's certificate. +By default, all non-loopback interface IPs are automatically added to the certificate's SANs. + + + +Examples: + + +``` yaml +certSANs: + - 10.0.0.10 + - 172.16.0.10 + - 192.168.0.10 +``` + + +
+ +
+ +
+ +kubelet KubeletConfig + +
+
+ +Used to provide additional options to the kubelet. + + + +Examples: + + +``` yaml +kubelet: + image: ghcr.io/talos-systems/kubelet:v1.21.2 # The `image` field is an optional reference to an alternative kubelet image. + # The `extraArgs` field is used to provide additional flags to the kubelet. + extraArgs: + feature-gates: ServerSideApply=true + + # # The `extraMounts` field is used to add additional mounts to the kubelet container. + # extraMounts: + # - destination: /var/lib/example + # type: bind + # source: /var/lib/example + # options: + # - rshared + # - rw +``` + + +
+ +
+ +
+ +network NetworkConfig + +
+
+ +Provides machine specific network configuration options. + + + +Examples: + + +``` yaml +network: + hostname: worker-1 # Used to statically set the hostname for the machine. + # `interfaces` is used to define the network interface configuration. + interfaces: + - interface: eth0 # The interface name. + cidr: 192.168.2.0/24 # Assigns a static IP address to the interface. + # A list of routes associated with the interface. + routes: + - network: 0.0.0.0/0 # The route's network. + gateway: 192.168.2.1 # The route's gateway. + metric: 1024 # The optional metric for the route. + mtu: 1500 # The interface's MTU. + + # # Bond specific options. + # bond: + # # The interfaces that make up the bond. + # interfaces: + # - eth0 + # - eth1 + # mode: 802.3ad # A bond option. + # lacpRate: fast # A bond option. + + # # Indicates if DHCP should be used to configure the interface. + # dhcp: true + + # # DHCP specific options. + # dhcpOptions: + # routeMetric: 1024 # The priority of all routes received via DHCP. + + # # Wireguard specific configuration. + + # # wireguard server example + # wireguard: + # privateKey: ABCDEF... # Specifies a private key configuration (base64 encoded). + # listenPort: 51111 # Specifies a device's listening port. + # # Specifies a list of peer configurations to apply to a device. + # peers: + # - publicKey: ABCDEF... # Specifies the public key of this peer. + # endpoint: 192.168.1.3 # Specifies the endpoint of this peer entry. + # # AllowedIPs specifies a list of allowed IP addresses in CIDR notation for this peer. + # allowedIPs: + # - 192.168.1.0/24 + # # wireguard peer example + # wireguard: + # privateKey: ABCDEF... # Specifies a private key configuration (base64 encoded). + # # Specifies a list of peer configurations to apply to a device. + # peers: + # - publicKey: ABCDEF... # Specifies the public key of this peer. + # endpoint: 192.168.1.2 # Specifies the endpoint of this peer entry. + # persistentKeepaliveInterval: 10s # Specifies the persistent keepalive interval for this peer. + # # AllowedIPs specifies a list of allowed IP addresses in CIDR notation for this peer. + # allowedIPs: + # - 192.168.1.0/24 + + # # Virtual (shared) IP address configuration. + # vip: + # ip: 172.16.199.55 # Specifies the IP address to be used. + # Used to statically set the nameservers for the machine. + nameservers: + - 9.8.7.6 + - 8.7.6.5 + + # # Allows for extra entries to be added to the `/etc/hosts` file + # extraHostEntries: + # - ip: 192.168.1.100 # The IP of the host. + # # The host alias. + # aliases: + # - example + # - example.domain.tld +``` + + +
+ +
+ +
+ +disks []MachineDisk + +
+
+ +Used to partition, format and mount additional disks. +Since the rootfs is read only with the exception of `/var`, mounts are only valid if they are under `/var`. +Note that the partitioning and formating is done only once, if and only if no existing partitions are found. +If `size:` is omitted, the partition is sized to occupy the full disk. + + +> Note: `size` is in units of bytes. + + + +Examples: + + +``` yaml +disks: + - device: /dev/sdb # The name of the disk to use. + # A list of partitions to create on the disk. + partitions: + - mountpoint: /var/mnt/extra # Where to mount the partition. + + # # The size of partition: either bytes or human readable representation. If `size:` is omitted, the partition is sized to occupy the full disk. + + # # Human readable representation. + # size: 100 MB + # # Precise value in bytes. + # size: 1073741824 +``` + + +
+ +
+ +
+ +install InstallConfig + +
+
+ +Used to provide instructions for installations. + + + +Examples: + + +``` yaml +install: + disk: /dev/sda # The disk used for installations. + # Allows for supplying extra kernel args via the bootloader. + extraKernelArgs: + - console=ttyS1 + - panic=10 + image: ghcr.io/talos-systems/installer:latest # Allows for supplying the image used to perform the installation. + bootloader: true # Indicates if a bootloader should be installed. + wipe: false # Indicates if the installation disk should be wiped at installation time. + + # # Look up disk using disk characteristics like model, size, serial and others. + # diskSelector: + # size: 4GB # Disk size. + # model: WDC* # Disk model `/sys/block//device/model`. +``` + + +
+ +
+ +
+ +files []MachineFile + +
+
+ +Allows the addition of user specified files. +The value of `op` can be `create`, `overwrite`, or `append`. +In the case of `create`, `path` must not exist. +In the case of `overwrite`, and `append`, `path` must be a valid file. +If an `op` value of `append` is used, the existing file will be appended. +Note that the file contents are not required to be base64 encoded. + + +> Note: The specified `path` is relative to `/var`. + + + +Examples: + + +``` yaml +files: + - content: '...' # The contents of the file. + permissions: 0o666 # The file's permissions in octal. + path: /tmp/file.txt # The path of the file. + op: append # The operation to use +``` + + +
+ +
+ +
+ +env Env + +
+
+ +The `env` field allows for the addition of environment variables. +All environment variables are set on PID 1 in addition to every service. + + +Valid values: + + + - `GRPC_GO_LOG_VERBOSITY_LEVEL` + + - `GRPC_GO_LOG_SEVERITY_LEVEL` + + - `http_proxy` + + - `https_proxy` + + - `no_proxy` + + +Examples: + + +``` yaml +env: + GRPC_GO_LOG_SEVERITY_LEVEL: info + GRPC_GO_LOG_VERBOSITY_LEVEL: "99" + https_proxy: http://SERVER:PORT/ +``` + +``` yaml +env: + GRPC_GO_LOG_SEVERITY_LEVEL: error + https_proxy: https://USERNAME:PASSWORD@SERVER:PORT/ +``` + +``` yaml +env: + https_proxy: http://DOMAIN\USERNAME:PASSWORD@SERVER:PORT/ +``` + + +
+ +
+ +
+ +time TimeConfig + +
+
+ +Used to configure the machine's time settings. + + + +Examples: + + +``` yaml +time: + disabled: false # Indicates if the time service is disabled for the machine. + # Specifies time (NTP) servers to use for setting the system time. + servers: + - time.cloudflare.com +``` + + +
+ +
+ +
+ +sysctls map[string]string + +
+
+ +Used to configure the machine's sysctls. + + + +Examples: + + +``` yaml +sysctls: + kernel.domainname: talos.dev + net.ipv4.ip_forward: "0" +``` + + +
+ +
+ +
+ +registries RegistriesConfig + +
+
+ +Used to configure the machine's container image registry mirrors. + +Automatically generates matching CRI configuration for registry mirrors. + +The `mirrors` section allows to redirect requests for images to non-default registry, +which might be local registry or caching mirror. + +The `config` section provides a way to authenticate to the registry with TLS client +identity, provide registry CA, or authentication information. +Authentication information has same meaning with the corresponding field in `.docker/config.json`. + +See also matching configuration for [CRI containerd plugin](https://github.com/containerd/cri/blob/master/docs/registry.md). + + + +Examples: + + +``` yaml +registries: + # Specifies mirror configuration for each registry. + mirrors: + docker.io: + # List of endpoints (URLs) for registry mirrors to use. + endpoints: + - https://registry.local + # Specifies TLS & auth configuration for HTTPS image registries. + config: + registry.local: + # The TLS configuration for the registry. + tls: + # Enable mutual TLS authentication with the registry. + clientIdentity: + crt: TFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVSklla05DTUhGLi4u + key: TFMwdExTMUNSVWRKVGlCRlJESTFOVEU1SUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLVFVNLi4u + # The auth configuration for this registry. + auth: + username: username # Optional registry authentication. + password: password # Optional registry authentication. +``` + + +
+ +
+ +
+ +systemDiskEncryption SystemDiskEncryptionConfig + +
+
+ +Machine system disk encryption configuration. +Defines each system partition encryption parameters. + + + +Examples: + + +``` yaml +systemDiskEncryption: + # Ephemeral partition encryption. + ephemeral: + provider: luks2 # Encryption provider to use for the encryption. + # Defines the encryption keys generation and storage method. + keys: + - # Deterministically generated key from the node UUID and PartitionLabel. + nodeID: {} + slot: 0 # Key slot number for luks2 encryption. +``` + + +
+ +
+ +
+ +features FeaturesConfig + +
+
+ +Features describe individual Talos features that can be switched on or off. + + + +Examples: + + +``` yaml +features: + rbac: true # Enable role-based access control (RBAC). +``` + + +
+ +
+ + + + + +## ClusterConfig +ClusterConfig represents the cluster-wide config values. + +Appears in: + + +- Config.cluster + + +``` yaml +# ControlPlaneConfig represents the control plane configuration options. +controlPlane: + endpoint: https://1.2.3.4 # Endpoint is the canonical controlplane endpoint, which can be an IP address or a DNS hostname. + localAPIServerPort: 443 # The port that the API server listens on internally. +clusterName: talos.local +# ClusterNetworkConfig represents kube networking configuration options. +network: + # The CNI used. + cni: + name: flannel # Name of CNI to use. + dnsDomain: cluster.local # The domain used by Kubernetes DNS. + # The pod subnet CIDR. + podSubnets: + - 10.244.0.0/16 + # The service subnet CIDR. + serviceSubnets: + - 10.96.0.0/12 +``` + +
+ +
+ +controlPlane ControlPlaneConfig + +
+
+ +Provides control plane specific configuration options. + + + +Examples: + + +``` yaml +controlPlane: + endpoint: https://1.2.3.4 # Endpoint is the canonical controlplane endpoint, which can be an IP address or a DNS hostname. + localAPIServerPort: 443 # The port that the API server listens on internally. +``` + + +
+ +
+ +
+ +clusterName string + +
+
+ +Configures the cluster's name. + +
+ +
+ +
+ +network ClusterNetworkConfig + +
+
+ +Provides cluster specific network configuration options. + + + +Examples: + + +``` yaml +network: + # The CNI used. + cni: + name: flannel # Name of CNI to use. + dnsDomain: cluster.local # The domain used by Kubernetes DNS. + # The pod subnet CIDR. + podSubnets: + - 10.244.0.0/16 + # The service subnet CIDR. + serviceSubnets: + - 10.96.0.0/12 +``` + + +
+ +
+ +
+ +token string + +
+
+ +The [bootstrap token](https://kubernetes.io/docs/reference/access-authn-authz/bootstrap-tokens/) used to join the cluster. + + + +Examples: + + +``` yaml +token: wlzjyw.bei2zfylhs2by0wd +``` + + +
+ +
+ +
+ +aescbcEncryptionSecret string + +
+
+ +The key used for the [encryption of secret data at rest](https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/). + + + +Examples: + + +``` yaml +aescbcEncryptionSecret: z01mye6j16bspJYtTB/5SFX8j7Ph4JXxM2Xuu4vsBPM= +``` + + +
+ +
+ +
+ +ca PEMEncodedCertificateAndKey + +
+
+ +The base64 encoded root certificate authority used by Kubernetes. + + + +Examples: + + +``` yaml +ca: + crt: TFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVSklla05DTUhGLi4u + key: TFMwdExTMUNSVWRKVGlCRlJESTFOVEU1SUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLVFVNLi4u +``` + + +
+ +
+ +
+ +aggregatorCA PEMEncodedCertificateAndKey + +
+
+ +The base64 encoded aggregator certificate authority used by Kubernetes for front-proxy certificate generation. + +This CA can be self-signed. + + + +Examples: + + +``` yaml +aggregatorCA: + crt: TFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVSklla05DTUhGLi4u + key: TFMwdExTMUNSVWRKVGlCRlJESTFOVEU1SUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLVFVNLi4u +``` + + +
+ +
+ +
+ +serviceAccount PEMEncodedKey + +
+
+ +The base64 encoded private key for service account token generation. + + + +Examples: + + +``` yaml +serviceAccount: + key: TFMwdExTMUNSVWRKVGlCRlJESTFOVEU1SUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLVFVNLi4u +``` + + +
+ +
+ +
+ +apiServer APIServerConfig + +
+
+ +API server specific configuration options. + + + +Examples: + + +``` yaml +apiServer: + image: k8s.gcr.io/kube-apiserver:v1.21.2 # The container image used in the API server manifest. + # Extra arguments to supply to the API server. + extraArgs: + feature-gates: ServerSideApply=true + http2-max-streams-per-connection: "32" + # Extra certificate subject alternative names for the API server's certificate. + certSANs: + - 1.2.3.4 + - 4.5.6.7 +``` + + +
+ +
+ +
+ +controllerManager ControllerManagerConfig + +
+
+ +Controller manager server specific configuration options. + + + +Examples: + + +``` yaml +controllerManager: + image: k8s.gcr.io/kube-controller-manager:v1.21.2 # The container image used in the controller manager manifest. + # Extra arguments to supply to the controller manager. + extraArgs: + feature-gates: ServerSideApply=true +``` + + +
+ +
+ +
+ +proxy ProxyConfig + +
+
+ +Kube-proxy server-specific configuration options + + + +Examples: + + +``` yaml +proxy: + image: k8s.gcr.io/kube-proxy:v1.21.2 # The container image used in the kube-proxy manifest. + mode: ipvs # proxy mode of kube-proxy. + # Extra arguments to supply to kube-proxy. + extraArgs: + proxy-mode: iptables +``` + + +
+ +
+ +
+ +scheduler SchedulerConfig + +
+
+ +Scheduler server specific configuration options. + + + +Examples: + + +``` yaml +scheduler: + image: k8s.gcr.io/kube-scheduler:v1.21.2 # The container image used in the scheduler manifest. + # Extra arguments to supply to the scheduler. + extraArgs: + feature-gates: AllBeta=true +``` + + +
+ +
+ +
+ +etcd EtcdConfig + +
+
+ +Etcd specific configuration options. + + + +Examples: + + +``` yaml +etcd: + image: gcr.io/etcd-development/etcd:v3.4.16 # The container image used to create the etcd service. + # The `ca` is the root certificate authority of the PKI. + ca: + crt: TFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVSklla05DTUhGLi4u + key: TFMwdExTMUNSVWRKVGlCRlJESTFOVEU1SUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLVFVNLi4u + # Extra arguments to supply to etcd. + extraArgs: + election-timeout: "5000" +``` + + +
+ +
+ +
+ +coreDNS CoreDNS + +
+
+ +Core DNS specific configuration options. + + + +Examples: + + +``` yaml +coreDNS: + image: docker.io/coredns/coredns:1.8.4 # The `image` field is an override to the default coredns image. +``` + + +
+ +
+ +
+ +externalCloudProvider ExternalCloudProviderConfig + +
+
+ +External cloud provider configuration. + + + +Examples: + + +``` yaml +externalCloudProvider: + enabled: true # Enable external cloud provider. + # A list of urls that point to additional manifests for an external cloud provider. + manifests: + - https://raw.githubusercontent.com/kubernetes/cloud-provider-aws/v1.20.0-alpha.0/manifests/rbac.yaml + - https://raw.githubusercontent.com/kubernetes/cloud-provider-aws/v1.20.0-alpha.0/manifests/aws-cloud-controller-manager-daemonset.yaml +``` + + +
+ +
+ +
+ +extraManifests []string + +
+
+ +A list of urls that point to additional manifests. +These will get automatically deployed as part of the bootstrap. + + + +Examples: + + +``` yaml +extraManifests: + - https://www.example.com/manifest1.yaml + - https://www.example.com/manifest2.yaml +``` + + +
+ +
+ +
+ +extraManifestHeaders map[string]string + +
+
+ +A map of key value pairs that will be added while fetching the extraManifests. + + + +Examples: + + +``` yaml +extraManifestHeaders: + Token: "1234567" + X-ExtraInfo: info +``` + + +
+ +
+ +
+ +inlineManifests ClusterInlineManifests + +
+
+ +A list of inline Kubernetes manifests. +These will get automatically deployed as part of the bootstrap. + + + +Examples: + + +``` yaml +inlineManifests: + - name: namespace-ci # Name of the manifest. + contents: |- # Manifest contents as a string. + apiVersion: v1 + kind: Namespace + metadata: + name: ci +``` + + +
+ +
+ +
+ +adminKubeconfig AdminKubeconfigConfig + +
+
+ +Settings for admin kubeconfig generation. +Certificate lifetime can be configured. + + + +Examples: + + +``` yaml +adminKubeconfig: + certLifetime: 1h0m0s # Admin kubeconfig certificate lifetime (default is 1 year). +``` + + +
+ +
+ +
+ +allowSchedulingOnMasters bool + +
+
+ +Allows running workload on master nodes. + + +Valid values: + + + - true + + - yes + + - false + + - no +
+ +
+ + + + + +## KubeletConfig +KubeletConfig represents the kubelet config values. + +Appears in: + + +- MachineConfig.kubelet + + +``` yaml +image: ghcr.io/talos-systems/kubelet:v1.21.2 # The `image` field is an optional reference to an alternative kubelet image. +# The `extraArgs` field is used to provide additional flags to the kubelet. +extraArgs: + feature-gates: ServerSideApply=true + +# # The `extraMounts` field is used to add additional mounts to the kubelet container. +# extraMounts: +# - destination: /var/lib/example +# type: bind +# source: /var/lib/example +# options: +# - rshared +# - rw +``` + +
+ +
+ +image string + +
+
+ +The `image` field is an optional reference to an alternative kubelet image. + + + +Examples: + + +``` yaml +image: ghcr.io/talos-systems/kubelet:v1.21.2 +``` + + +
+ +
+ +
+ +extraArgs map[string]string + +
+
+ +The `extraArgs` field is used to provide additional flags to the kubelet. + + + +Examples: + + +``` yaml +extraArgs: + key: value +``` + + +
+ +
+ +
+ +extraMounts []Mount + +
+
+ +The `extraMounts` field is used to add additional mounts to the kubelet container. + + + +Examples: + + +``` yaml +extraMounts: + - destination: /var/lib/example + type: bind + source: /var/lib/example + options: + - rshared + - rw +``` + + +
+ +
+ +
+ +registerWithFQDN bool + +
+
+ +The `registerWithFQDN` field is used to force kubelet to use the node FQDN for registration. +This is required in clouds like AWS. + + +Valid values: + + + - true + + - yes + + - false + + - no +
+ +
+ + + + + +## NetworkConfig +NetworkConfig represents the machine's networking config values. + +Appears in: + + +- MachineConfig.network + + +``` yaml +hostname: worker-1 # Used to statically set the hostname for the machine. +# `interfaces` is used to define the network interface configuration. +interfaces: + - interface: eth0 # The interface name. + cidr: 192.168.2.0/24 # Assigns a static IP address to the interface. + # A list of routes associated with the interface. + routes: + - network: 0.0.0.0/0 # The route's network. + gateway: 192.168.2.1 # The route's gateway. + metric: 1024 # The optional metric for the route. + mtu: 1500 # The interface's MTU. + + # # Bond specific options. + # bond: + # # The interfaces that make up the bond. + # interfaces: + # - eth0 + # - eth1 + # mode: 802.3ad # A bond option. + # lacpRate: fast # A bond option. + + # # Indicates if DHCP should be used to configure the interface. + # dhcp: true + + # # DHCP specific options. + # dhcpOptions: + # routeMetric: 1024 # The priority of all routes received via DHCP. + + # # Wireguard specific configuration. + + # # wireguard server example + # wireguard: + # privateKey: ABCDEF... # Specifies a private key configuration (base64 encoded). + # listenPort: 51111 # Specifies a device's listening port. + # # Specifies a list of peer configurations to apply to a device. + # peers: + # - publicKey: ABCDEF... # Specifies the public key of this peer. + # endpoint: 192.168.1.3 # Specifies the endpoint of this peer entry. + # # AllowedIPs specifies a list of allowed IP addresses in CIDR notation for this peer. + # allowedIPs: + # - 192.168.1.0/24 + # # wireguard peer example + # wireguard: + # privateKey: ABCDEF... # Specifies a private key configuration (base64 encoded). + # # Specifies a list of peer configurations to apply to a device. + # peers: + # - publicKey: ABCDEF... # Specifies the public key of this peer. + # endpoint: 192.168.1.2 # Specifies the endpoint of this peer entry. + # persistentKeepaliveInterval: 10s # Specifies the persistent keepalive interval for this peer. + # # AllowedIPs specifies a list of allowed IP addresses in CIDR notation for this peer. + # allowedIPs: + # - 192.168.1.0/24 + + # # Virtual (shared) IP address configuration. + # vip: + # ip: 172.16.199.55 # Specifies the IP address to be used. +# Used to statically set the nameservers for the machine. +nameservers: + - 9.8.7.6 + - 8.7.6.5 + +# # Allows for extra entries to be added to the `/etc/hosts` file +# extraHostEntries: +# - ip: 192.168.1.100 # The IP of the host. +# # The host alias. +# aliases: +# - example +# - example.domain.tld +``` + +
+ +
+ +hostname string + +
+
+ +Used to statically set the hostname for the machine. + +
+ +
+ +
+ +interfaces []Device + +
+
+ +`interfaces` is used to define the network interface configuration. +By default all network interfaces will attempt a DHCP discovery. +This can be further tuned through this configuration parameter. + + + +Examples: + + +``` yaml +interfaces: + - interface: eth0 # The interface name. + cidr: 192.168.2.0/24 # Assigns a static IP address to the interface. + # A list of routes associated with the interface. + routes: + - network: 0.0.0.0/0 # The route's network. + gateway: 192.168.2.1 # The route's gateway. + metric: 1024 # The optional metric for the route. + mtu: 1500 # The interface's MTU. + + # # Bond specific options. + # bond: + # # The interfaces that make up the bond. + # interfaces: + # - eth0 + # - eth1 + # mode: 802.3ad # A bond option. + # lacpRate: fast # A bond option. + + # # Indicates if DHCP should be used to configure the interface. + # dhcp: true + + # # DHCP specific options. + # dhcpOptions: + # routeMetric: 1024 # The priority of all routes received via DHCP. + + # # Wireguard specific configuration. + + # # wireguard server example + # wireguard: + # privateKey: ABCDEF... # Specifies a private key configuration (base64 encoded). + # listenPort: 51111 # Specifies a device's listening port. + # # Specifies a list of peer configurations to apply to a device. + # peers: + # - publicKey: ABCDEF... # Specifies the public key of this peer. + # endpoint: 192.168.1.3 # Specifies the endpoint of this peer entry. + # # AllowedIPs specifies a list of allowed IP addresses in CIDR notation for this peer. + # allowedIPs: + # - 192.168.1.0/24 + # # wireguard peer example + # wireguard: + # privateKey: ABCDEF... # Specifies a private key configuration (base64 encoded). + # # Specifies a list of peer configurations to apply to a device. + # peers: + # - publicKey: ABCDEF... # Specifies the public key of this peer. + # endpoint: 192.168.1.2 # Specifies the endpoint of this peer entry. + # persistentKeepaliveInterval: 10s # Specifies the persistent keepalive interval for this peer. + # # AllowedIPs specifies a list of allowed IP addresses in CIDR notation for this peer. + # allowedIPs: + # - 192.168.1.0/24 + + # # Virtual (shared) IP address configuration. + # vip: + # ip: 172.16.199.55 # Specifies the IP address to be used. +``` + + +
+ +
+ +
+ +nameservers []string + +
+
+ +Used to statically set the nameservers for the machine. +Defaults to `1.1.1.1` and `8.8.8.8` + + + +Examples: + + +``` yaml +nameservers: + - 8.8.8.8 + - 1.1.1.1 +``` + + +
+ +
+ +
+ +extraHostEntries []ExtraHost + +
+
+ +Allows for extra entries to be added to the `/etc/hosts` file + + + +Examples: + + +``` yaml +extraHostEntries: + - ip: 192.168.1.100 # The IP of the host. + # The host alias. + aliases: + - example + - example.domain.tld +``` + + +
+ +
+ + + + + +## InstallConfig +InstallConfig represents the installation options for preparing a node. + +Appears in: + + +- MachineConfig.install + + +``` yaml +disk: /dev/sda # The disk used for installations. +# Allows for supplying extra kernel args via the bootloader. +extraKernelArgs: + - console=ttyS1 + - panic=10 +image: ghcr.io/talos-systems/installer:latest # Allows for supplying the image used to perform the installation. +bootloader: true # Indicates if a bootloader should be installed. +wipe: false # Indicates if the installation disk should be wiped at installation time. + +# # Look up disk using disk characteristics like model, size, serial and others. +# diskSelector: +# size: 4GB # Disk size. +# model: WDC* # Disk model `/sys/block//device/model`. +``` + +
+ +
+ +disk string + +
+
+ +The disk used for installations. + + + +Examples: + + +``` yaml +disk: /dev/sda +``` + +``` yaml +disk: /dev/nvme0 +``` + + +
+ +
+ +
+ +diskSelector InstallDiskSelector + +
+
+ +Look up disk using disk characteristics like model, size, serial and others. +Always has priority over `disk`. + + + +Examples: + + +``` yaml +diskSelector: + size: 4GB # Disk size. + model: WDC* # Disk model `/sys/block//device/model`. +``` + + +
+ +
+ +
+ +extraKernelArgs []string + +
+
+ +Allows for supplying extra kernel args via the bootloader. + + + +Examples: + + +``` yaml +extraKernelArgs: + - talos.platform=metal + - reboot=k +``` + + +
+ +
+ +
+ +image string + +
+
+ +Allows for supplying the image used to perform the installation. +Image reference for each Talos release can be found on +[GitHub releases page](https://github.com/talos-systems/talos/releases). + + + +Examples: + + +``` yaml +image: ghcr.io/talos-systems/installer:latest +``` + + +
+ +
+ +
+ +bootloader bool + +
+
+ +Indicates if a bootloader should be installed. + + +Valid values: + + + - true + + - yes + + - false + + - no +
+ +
+ +
+ +wipe bool + +
+
+ +Indicates if the installation disk should be wiped at installation time. +Defaults to `true`. + + +Valid values: + + + - true + + - yes + + - false + + - no +
+ +
+ +
+ +legacyBIOSSupport bool + +
+
+ +Indicates if MBR partition should be marked as bootable (active). +Should be enabled only for the systems with legacy BIOS that doesn't support GPT partitioning scheme. + +
+ +
+ + + + + +## InstallDiskSizeMatcher +InstallDiskSizeMatcher disk size condition parser. + +Appears in: + + +- InstallDiskSelector.size + + +``` yaml +4GB +``` +``` yaml +'> 1TB' +``` +``` yaml +<= 2TB +``` + + + +## InstallDiskSelector +InstallDiskSelector represents a disk query parameters for the install disk lookup. + +Appears in: + + +- InstallConfig.diskSelector + + +``` yaml +size: 4GB # Disk size. +model: WDC* # Disk model `/sys/block//device/model`. +``` + +
+ + +
+ +Disk size. + + + +Examples: + + +``` yaml +size: 4GB +``` + +``` yaml +size: '> 1TB' +``` + +``` yaml +size: <= 2TB +``` + + +
+ +
+ +
+ +name string + +
+
+ +Disk name `/sys/block//device/name`. + +
+ +
+ +
+ +model string + +
+
+ +Disk model `/sys/block//device/model`. + +
+ +
+ +
+ +serial string + +
+
+ +Disk serial number `/sys/block//serial`. + +
+ +
+ +
+ +modalias string + +
+
+ +Disk modalias `/sys/block//device/modalias`. + +
+ +
+ +
+ +uuid string + +
+
+ +Disk UUID `/sys/block//uuid`. + +
+ +
+ +
+ +wwid string + +
+
+ +Disk WWID `/sys/block//wwid`. + +
+ +
+ +
+ +type InstallDiskType + +
+
+ +Disk Type. + + +Valid values: + + + - ssd + + - hdd + + - nvme + + - sd +
+ +
+ + + + + +## TimeConfig +TimeConfig represents the options for configuring time on a machine. + +Appears in: + + +- MachineConfig.time + + +``` yaml +disabled: false # Indicates if the time service is disabled for the machine. +# Specifies time (NTP) servers to use for setting the system time. +servers: + - time.cloudflare.com +``` + +
+ +
+ +disabled bool + +
+
+ +Indicates if the time service is disabled for the machine. +Defaults to `false`. + +
+ +
+ +
+ +servers []string + +
+
+ +Specifies time (NTP) servers to use for setting the system time. +Defaults to `pool.ntp.org` + + +> This parameter only supports a single time server. + +
+ +
+ + + + + +## RegistriesConfig +RegistriesConfig represents the image pull options. + +Appears in: + + +- MachineConfig.registries + + +``` yaml +# Specifies mirror configuration for each registry. +mirrors: + docker.io: + # List of endpoints (URLs) for registry mirrors to use. + endpoints: + - https://registry.local +# Specifies TLS & auth configuration for HTTPS image registries. +config: + registry.local: + # The TLS configuration for the registry. + tls: + # Enable mutual TLS authentication with the registry. + clientIdentity: + crt: TFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVSklla05DTUhGLi4u + key: TFMwdExTMUNSVWRKVGlCRlJESTFOVEU1SUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLVFVNLi4u + # The auth configuration for this registry. + auth: + username: username # Optional registry authentication. + password: password # Optional registry authentication. +``` + +
+ +
+ +mirrors map[string]RegistryMirrorConfig + +
+
+ +Specifies mirror configuration for each registry. +This setting allows to use local pull-through caching registires, +air-gapped installations, etc. + +Registry name is the first segment of image identifier, with 'docker.io' +being default one. +To catch any registry names not specified explicitly, use '*'. + + + +Examples: + + +``` yaml +mirrors: + ghcr.io: + # List of endpoints (URLs) for registry mirrors to use. + endpoints: + - https://registry.insecure + - https://ghcr.io/v2/ +``` + + +
+ +
+ +
+ +config map[string]RegistryConfig + +
+
+ +Specifies TLS & auth configuration for HTTPS image registries. +Mutual TLS can be enabled with 'clientIdentity' option. + +TLS configuration can be skipped if registry has trusted +server certificate. + + + +Examples: + + +``` yaml +config: + registry.insecure: + # The TLS configuration for the registry. + tls: + insecureSkipVerify: true # Skip TLS server certificate verification (not recommended). + + # # Enable mutual TLS authentication with the registry. + # clientIdentity: + # crt: TFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVSklla05DTUhGLi4u + # key: TFMwdExTMUNSVWRKVGlCRlJESTFOVEU1SUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLVFVNLi4u + + # # The auth configuration for this registry. + # auth: + # username: username # Optional registry authentication. + # password: password # Optional registry authentication. +``` + + +
+ +
+ + + + + +## PodCheckpointer +PodCheckpointer represents the pod-checkpointer config values. + + + + +
+ +
+ +image string + +
+
+ +The `image` field is an override to the default pod-checkpointer image. + +
+ +
+ + + + + +## CoreDNS +CoreDNS represents the CoreDNS config values. + +Appears in: + + +- ClusterConfig.coreDNS + + +``` yaml +image: docker.io/coredns/coredns:1.8.4 # The `image` field is an override to the default coredns image. +``` + +
+ +
+ +disabled bool + +
+
+ +Disable coredns deployment on cluster bootstrap. + +
+ +
+ +
+ +image string + +
+
+ +The `image` field is an override to the default coredns image. + +
+ +
+ + + + + +## Endpoint +Endpoint represents the endpoint URL parsed out of the machine config. + +Appears in: + + +- ControlPlaneConfig.endpoint + + +``` yaml +https://1.2.3.4:6443 +``` +``` yaml +https://cluster1.internal:6443 +``` + + + +## ControlPlaneConfig +ControlPlaneConfig represents the control plane configuration options. + +Appears in: + + +- ClusterConfig.controlPlane + + +``` yaml +endpoint: https://1.2.3.4 # Endpoint is the canonical controlplane endpoint, which can be an IP address or a DNS hostname. +localAPIServerPort: 443 # The port that the API server listens on internally. +``` + +
+ +
+ +endpoint Endpoint + +
+
+ +Endpoint is the canonical controlplane endpoint, which can be an IP address or a DNS hostname. +It is single-valued, and may optionally include a port number. + + + +Examples: + + +``` yaml +endpoint: https://1.2.3.4:6443 +``` + +``` yaml +endpoint: https://cluster1.internal:6443 +``` + + +
+ +
+ +
+ +localAPIServerPort int + +
+
+ +The port that the API server listens on internally. +This may be different than the port portion listed in the endpoint field above. +The default is `6443`. + +
+ +
+ + + + + +## APIServerConfig +APIServerConfig represents the kube apiserver configuration options. + +Appears in: + + +- ClusterConfig.apiServer + + +``` yaml +image: k8s.gcr.io/kube-apiserver:v1.21.2 # The container image used in the API server manifest. +# Extra arguments to supply to the API server. +extraArgs: + feature-gates: ServerSideApply=true + http2-max-streams-per-connection: "32" +# Extra certificate subject alternative names for the API server's certificate. +certSANs: + - 1.2.3.4 + - 4.5.6.7 +``` + +
+ +
+ +image string + +
+
+ +The container image used in the API server manifest. + + + +Examples: + + +``` yaml +image: k8s.gcr.io/kube-apiserver:v1.21.2 +``` + + +
+ +
+ +
+ +extraArgs map[string]string + +
+
+ +Extra arguments to supply to the API server. + +
+ +
+ +
+ +extraVolumes []VolumeMountConfig + +
+
+ +Extra volumes to mount to the API server static pod. + +
+ +
+ +
+ +certSANs []string + +
+
+ +Extra certificate subject alternative names for the API server's certificate. + +
+ +
+ + + + + +## ControllerManagerConfig +ControllerManagerConfig represents the kube controller manager configuration options. + +Appears in: + + +- ClusterConfig.controllerManager + + +``` yaml +image: k8s.gcr.io/kube-controller-manager:v1.21.2 # The container image used in the controller manager manifest. +# Extra arguments to supply to the controller manager. +extraArgs: + feature-gates: ServerSideApply=true +``` + +
+ +
+ +image string + +
+
+ +The container image used in the controller manager manifest. + + + +Examples: + + +``` yaml +image: k8s.gcr.io/kube-controller-manager:v1.21.2 +``` + + +
+ +
+ +
+ +extraArgs map[string]string + +
+
+ +Extra arguments to supply to the controller manager. + +
+ +
+ +
+ +extraVolumes []VolumeMountConfig + +
+
+ +Extra volumes to mount to the controller manager static pod. + +
+ +
+ + + + + +## ProxyConfig +ProxyConfig represents the kube proxy configuration options. + +Appears in: + + +- ClusterConfig.proxy + + +``` yaml +image: k8s.gcr.io/kube-proxy:v1.21.2 # The container image used in the kube-proxy manifest. +mode: ipvs # proxy mode of kube-proxy. +# Extra arguments to supply to kube-proxy. +extraArgs: + proxy-mode: iptables +``` + +
+ +
+ +disabled bool + +
+
+ +Disable kube-proxy deployment on cluster bootstrap. + + + +Examples: + + +``` yaml +disabled: false +``` + + +
+ +
+ +
+ +image string + +
+
+ +The container image used in the kube-proxy manifest. + + + +Examples: + + +``` yaml +image: k8s.gcr.io/kube-proxy:v1.21.2 +``` + + +
+ +
+ +
+ +mode string + +
+
+ +proxy mode of kube-proxy. +The default is 'iptables'. + +
+ +
+ +
+ +extraArgs map[string]string + +
+
+ +Extra arguments to supply to kube-proxy. + +
+ +
+ + + + + +## SchedulerConfig +SchedulerConfig represents the kube scheduler configuration options. + +Appears in: + + +- ClusterConfig.scheduler + + +``` yaml +image: k8s.gcr.io/kube-scheduler:v1.21.2 # The container image used in the scheduler manifest. +# Extra arguments to supply to the scheduler. +extraArgs: + feature-gates: AllBeta=true +``` + +
+ +
+ +image string + +
+
+ +The container image used in the scheduler manifest. + + + +Examples: + + +``` yaml +image: k8s.gcr.io/kube-scheduler:v1.21.2 +``` + + +
+ +
+ +
+ +extraArgs map[string]string + +
+
+ +Extra arguments to supply to the scheduler. + +
+ +
+ +
+ +extraVolumes []VolumeMountConfig + +
+
+ +Extra volumes to mount to the scheduler static pod. + +
+ +
+ + + + + +## EtcdConfig +EtcdConfig represents the etcd configuration options. + +Appears in: + + +- ClusterConfig.etcd + + +``` yaml +image: gcr.io/etcd-development/etcd:v3.4.16 # The container image used to create the etcd service. +# The `ca` is the root certificate authority of the PKI. +ca: + crt: TFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVSklla05DTUhGLi4u + key: TFMwdExTMUNSVWRKVGlCRlJESTFOVEU1SUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLVFVNLi4u +# Extra arguments to supply to etcd. +extraArgs: + election-timeout: "5000" +``` + +
+ +
+ +image string + +
+
+ +The container image used to create the etcd service. + + + +Examples: + + +``` yaml +image: gcr.io/etcd-development/etcd:v3.4.16 +``` + + +
+ +
+ +
+ +ca PEMEncodedCertificateAndKey + +
+
+ +The `ca` is the root certificate authority of the PKI. +It is composed of a base64 encoded `crt` and `key`. + + + +Examples: + + +``` yaml +ca: + crt: TFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVSklla05DTUhGLi4u + key: TFMwdExTMUNSVWRKVGlCRlJESTFOVEU1SUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLVFVNLi4u +``` + + +
+ +
+ +
+ +extraArgs map[string]string + +
+
+ +Extra arguments to supply to etcd. +Note that the following args are not allowed: + +- `name` +- `data-dir` +- `initial-cluster-state` +- `listen-peer-urls` +- `listen-client-urls` +- `cert-file` +- `key-file` +- `trusted-ca-file` +- `peer-client-cert-auth` +- `peer-cert-file` +- `peer-trusted-ca-file` +- `peer-key-file` + +
+ +
+ + + + + +## ClusterNetworkConfig +ClusterNetworkConfig represents kube networking configuration options. + +Appears in: + + +- ClusterConfig.network + + +``` yaml +# The CNI used. +cni: + name: flannel # Name of CNI to use. +dnsDomain: cluster.local # The domain used by Kubernetes DNS. +# The pod subnet CIDR. +podSubnets: + - 10.244.0.0/16 +# The service subnet CIDR. +serviceSubnets: + - 10.96.0.0/12 +``` + +
+ +
+ +cni CNIConfig + +
+
+ +The CNI used. +Composed of "name" and "urls". +The "name" key supports the following options: "flannel", "custom", and "none". +"flannel" uses Talos-managed Flannel CNI, and that's the default option. +"custom" uses custom manifests that should be provided in "urls". +"none" indicates that Talos will not manage any CNI installation. + + + +Examples: + + +``` yaml +cni: + name: custom # Name of CNI to use. + # URLs containing manifests to apply for the CNI. + urls: + - https://raw.githubusercontent.com/cilium/cilium/v1.8/install/kubernetes/quick-install.yaml +``` + + +
+ +
+ +
+ +dnsDomain string + +
+
+ +The domain used by Kubernetes DNS. +The default is `cluster.local` + + + +Examples: + + +``` yaml +dnsDomain: cluser.local +``` + + +
+ +
+ +
+ +podSubnets []string + +
+
+ +The pod subnet CIDR. + + + +Examples: + + +``` yaml +podSubnets: + - 10.244.0.0/16 +``` + + +
+ +
+ +
+ +serviceSubnets []string + +
+
+ +The service subnet CIDR. + + + +Examples: + + +``` yaml +serviceSubnets: + - 10.96.0.0/12 +``` + + +
+ +
+ + + + + +## CNIConfig +CNIConfig represents the CNI configuration options. + +Appears in: + + +- ClusterNetworkConfig.cni + + +``` yaml +name: custom # Name of CNI to use. +# URLs containing manifests to apply for the CNI. +urls: + - https://raw.githubusercontent.com/cilium/cilium/v1.8/install/kubernetes/quick-install.yaml +``` + +
+ +
+ +name string + +
+
+ +Name of CNI to use. + + +Valid values: + + + - flannel + + - custom + + - none +
+ +
+ +
+ +urls []string + +
+
+ +URLs containing manifests to apply for the CNI. +Should be present for "custom", must be empty for "flannel" and "none". + +
+ +
+ + + + + +## ExternalCloudProviderConfig +ExternalCloudProviderConfig contains external cloud provider configuration. + +Appears in: + + +- ClusterConfig.externalCloudProvider + + +``` yaml +enabled: true # Enable external cloud provider. +# A list of urls that point to additional manifests for an external cloud provider. +manifests: + - https://raw.githubusercontent.com/kubernetes/cloud-provider-aws/v1.20.0-alpha.0/manifests/rbac.yaml + - https://raw.githubusercontent.com/kubernetes/cloud-provider-aws/v1.20.0-alpha.0/manifests/aws-cloud-controller-manager-daemonset.yaml +``` + +
+ +
+ +enabled bool + +
+
+ +Enable external cloud provider. + + +Valid values: + + + - true + + - yes + + - false + + - no +
+ +
+ +
+ +manifests []string + +
+
+ +A list of urls that point to additional manifests for an external cloud provider. +These will get automatically deployed as part of the bootstrap. + + + +Examples: + + +``` yaml +manifests: + - https://raw.githubusercontent.com/kubernetes/cloud-provider-aws/v1.20.0-alpha.0/manifests/rbac.yaml + - https://raw.githubusercontent.com/kubernetes/cloud-provider-aws/v1.20.0-alpha.0/manifests/aws-cloud-controller-manager-daemonset.yaml +``` + + +
+ +
+ + + + + +## AdminKubeconfigConfig +AdminKubeconfigConfig contains admin kubeconfig settings. + +Appears in: + + +- ClusterConfig.adminKubeconfig + + +``` yaml +certLifetime: 1h0m0s # Admin kubeconfig certificate lifetime (default is 1 year). +``` + +
+ +
+ +certLifetime Duration + +
+
+ +Admin kubeconfig certificate lifetime (default is 1 year). +Field format accepts any Go time.Duration format ('1h' for one hour, '10m' for ten minutes). + +
+ +
+ + + + + +## MachineDisk +MachineDisk represents the options available for partitioning, formatting, and +mounting extra disks. + + +Appears in: + + +- MachineConfig.disks + + +``` yaml +- device: /dev/sdb # The name of the disk to use. + # A list of partitions to create on the disk. + partitions: + - mountpoint: /var/mnt/extra # Where to mount the partition. + + # # The size of partition: either bytes or human readable representation. If `size:` is omitted, the partition is sized to occupy the full disk. + + # # Human readable representation. + # size: 100 MB + # # Precise value in bytes. + # size: 1073741824 +``` + +
+ +
+ +device string + +
+
+ +The name of the disk to use. + +
+ +
+ +
+ +partitions []DiskPartition + +
+
+ +A list of partitions to create on the disk. + +
+ +
+ + + + + +## DiskPartition +DiskPartition represents the options for a disk partition. + +Appears in: + + +- MachineDisk.partitions + + + +
+ +
+ +size DiskSize + +
+
+ +The size of partition: either bytes or human readable representation. If `size:` is omitted, the partition is sized to occupy the full disk. + + + +Examples: + + +``` yaml +size: 100 MB +``` + +``` yaml +size: 1073741824 +``` + + +
+ +
+ +
+ +mountpoint string + +
+
+ +Where to mount the partition. + +
+ +
+ + + + + +## EncryptionConfig +EncryptionConfig represents partition encryption settings. + +Appears in: + + +- SystemDiskEncryptionConfig.state + +- SystemDiskEncryptionConfig.ephemeral + + + +
+ +
+ +provider string + +
+
+ +Encryption provider to use for the encryption. + + + +Examples: + + +``` yaml +provider: luks2 +``` + + +
+ +
+ +
+ +keys []EncryptionKey + +
+
+ +Defines the encryption keys generation and storage method. + +
+ +
+ +
+ +cipher string + +
+
+ +Cipher kind to use for the encryption. Depends on the encryption provider. + +
+ +
+ + + + + +## EncryptionKey +EncryptionKey represents configuration for disk encryption key. + +Appears in: + + +- EncryptionConfig.keys + + + +
+ +
+ +static EncryptionKeyStatic + +
+
+ +Key which value is stored in the configuration file. + +
+ +
+ +
+ +nodeID EncryptionKeyNodeID + +
+
+ +Deterministically generated key from the node UUID and PartitionLabel. + +
+ +
+ +
+ +slot int + +
+
+ +Key slot number for luks2 encryption. + +
+ +
+ + + + + +## EncryptionKeyStatic +EncryptionKeyStatic represents throw away key type. + +Appears in: + + +- EncryptionKey.static + + + +
+ +
+ +passphrase string + +
+
+ +Defines the static passphrase value. + +
+ +
+ + + + + +## EncryptionKeyNodeID +EncryptionKeyNodeID represents deterministically generated key from the node UUID and PartitionLabel. + +Appears in: + + +- EncryptionKey.nodeID + + + + + +## MachineFile +MachineFile represents a file to write to disk. + +Appears in: + + +- MachineConfig.files + + +``` yaml +- content: '...' # The contents of the file. + permissions: 0o666 # The file's permissions in octal. + path: /tmp/file.txt # The path of the file. + op: append # The operation to use +``` + +
+ +
+ +content string + +
+
+ +The contents of the file. + +
+ +
+ +
+ +permissions FileMode + +
+
+ +The file's permissions in octal. + +
+ +
+ +
+ +path string + +
+
+ +The path of the file. + +
+ +
+ +
+ +op string + +
+
+ +The operation to use + + +Valid values: + + + - create + + - append + + - overwrite +
+ +
+ + + + + +## ExtraHost +ExtraHost represents a host entry in /etc/hosts. + +Appears in: + + +- NetworkConfig.extraHostEntries + + +``` yaml +- ip: 192.168.1.100 # The IP of the host. + # The host alias. + aliases: + - example + - example.domain.tld +``` + +
+ +
+ +ip string + +
+
+ +The IP of the host. + +
+ +
+ +
+ +aliases []string + +
+
+ +The host alias. + +
+ +
+ + + + + +## Device +Device represents a network interface. + +Appears in: + + +- NetworkConfig.interfaces + + +``` yaml +- interface: eth0 # The interface name. + cidr: 192.168.2.0/24 # Assigns a static IP address to the interface. + # A list of routes associated with the interface. + routes: + - network: 0.0.0.0/0 # The route's network. + gateway: 192.168.2.1 # The route's gateway. + metric: 1024 # The optional metric for the route. + mtu: 1500 # The interface's MTU. + + # # Bond specific options. + # bond: + # # The interfaces that make up the bond. + # interfaces: + # - eth0 + # - eth1 + # mode: 802.3ad # A bond option. + # lacpRate: fast # A bond option. + + # # Indicates if DHCP should be used to configure the interface. + # dhcp: true + + # # DHCP specific options. + # dhcpOptions: + # routeMetric: 1024 # The priority of all routes received via DHCP. + + # # Wireguard specific configuration. + + # # wireguard server example + # wireguard: + # privateKey: ABCDEF... # Specifies a private key configuration (base64 encoded). + # listenPort: 51111 # Specifies a device's listening port. + # # Specifies a list of peer configurations to apply to a device. + # peers: + # - publicKey: ABCDEF... # Specifies the public key of this peer. + # endpoint: 192.168.1.3 # Specifies the endpoint of this peer entry. + # # AllowedIPs specifies a list of allowed IP addresses in CIDR notation for this peer. + # allowedIPs: + # - 192.168.1.0/24 + # # wireguard peer example + # wireguard: + # privateKey: ABCDEF... # Specifies a private key configuration (base64 encoded). + # # Specifies a list of peer configurations to apply to a device. + # peers: + # - publicKey: ABCDEF... # Specifies the public key of this peer. + # endpoint: 192.168.1.2 # Specifies the endpoint of this peer entry. + # persistentKeepaliveInterval: 10s # Specifies the persistent keepalive interval for this peer. + # # AllowedIPs specifies a list of allowed IP addresses in CIDR notation for this peer. + # allowedIPs: + # - 192.168.1.0/24 + + # # Virtual (shared) IP address configuration. + # vip: + # ip: 172.16.199.55 # Specifies the IP address to be used. +``` + +
+ +
+ +interface string + +
+
+ +The interface name. + + + +Examples: + + +``` yaml +interface: eth0 +``` + + +
+ +
+ +
+ +cidr string + +
+
+ +Assigns a static IP address to the interface. +This should be in proper CIDR notation. + +> Note: This option is mutually exclusive with DHCP option. + + + +Examples: + + +``` yaml +cidr: 10.5.0.0/16 +``` + + +
+ +
+ +
+ +routes []Route + +
+
+ +A list of routes associated with the interface. +If used in combination with DHCP, these routes will be appended to routes returned by DHCP server. + + + +Examples: + + +``` yaml +routes: + - network: 0.0.0.0/0 # The route's network. + gateway: 10.5.0.1 # The route's gateway. + - network: 10.2.0.0/16 # The route's network. + gateway: 10.2.0.1 # The route's gateway. +``` + + +
+ +
+ +
+ +bond Bond + +
+
+ +Bond specific options. + + + +Examples: + + +``` yaml +bond: + # The interfaces that make up the bond. + interfaces: + - eth0 + - eth1 + mode: 802.3ad # A bond option. + lacpRate: fast # A bond option. +``` + + +
+ +
+ +
+ +vlans []Vlan + +
+
+ +VLAN specific options. + +
+ +
+ +
+ +mtu int + +
+
+ +The interface's MTU. +If used in combination with DHCP, this will override any MTU settings returned from DHCP server. + +
+ +
+ +
+ +dhcp bool + +
+
+ +Indicates if DHCP should be used to configure the interface. +The following DHCP options are supported: + +- `OptionClasslessStaticRoute` +- `OptionDomainNameServer` +- `OptionDNSDomainSearchList` +- `OptionHostName` + +> Note: This option is mutually exclusive with CIDR. +> +> Note: To configure an interface with *only* IPv6 SLAAC addressing, CIDR should be set to "" and DHCP to false +> in order for Talos to skip configuration of addresses. +> All other options will still apply. + + + +Examples: + + +``` yaml +dhcp: true +``` + + +
+ +
+ +
+ +ignore bool + +
+
+ +Indicates if the interface should be ignored (skips configuration). + +
+ +
+ +
+ +dummy bool + +
+
+ +Indicates if the interface is a dummy interface. +`dummy` is used to specify that this interface should be a virtual-only, dummy interface. + +
+ +
+ +
+ +dhcpOptions DHCPOptions + +
+
+ +DHCP specific options. +`dhcp` *must* be set to true for these to take effect. + + + +Examples: + + +``` yaml +dhcpOptions: + routeMetric: 1024 # The priority of all routes received via DHCP. +``` + + +
+ +
+ +
+ +wireguard DeviceWireguardConfig + +
+
+ +Wireguard specific configuration. +Includes things like private key, listen port, peers. + + + +Examples: + + +``` yaml +wireguard: + privateKey: ABCDEF... # Specifies a private key configuration (base64 encoded). + listenPort: 51111 # Specifies a device's listening port. + # Specifies a list of peer configurations to apply to a device. + peers: + - publicKey: ABCDEF... # Specifies the public key of this peer. + endpoint: 192.168.1.3 # Specifies the endpoint of this peer entry. + # AllowedIPs specifies a list of allowed IP addresses in CIDR notation for this peer. + allowedIPs: + - 192.168.1.0/24 +``` + +``` yaml +wireguard: + privateKey: ABCDEF... # Specifies a private key configuration (base64 encoded). + # Specifies a list of peer configurations to apply to a device. + peers: + - publicKey: ABCDEF... # Specifies the public key of this peer. + endpoint: 192.168.1.2 # Specifies the endpoint of this peer entry. + persistentKeepaliveInterval: 10s # Specifies the persistent keepalive interval for this peer. + # AllowedIPs specifies a list of allowed IP addresses in CIDR notation for this peer. + allowedIPs: + - 192.168.1.0/24 +``` + + +
+ +
+ +
+ +vip DeviceVIPConfig + +
+
+ +Virtual (shared) IP address configuration. + + + +Examples: + + +``` yaml +vip: + ip: 172.16.199.55 # Specifies the IP address to be used. +``` + + +
+ +
+ + + + + +## DHCPOptions +DHCPOptions contains options for configuring the DHCP settings for a given interface. + +Appears in: + + +- Device.dhcpOptions + + +``` yaml +routeMetric: 1024 # The priority of all routes received via DHCP. +``` + +
+ +
+ +routeMetric uint32 + +
+
+ +The priority of all routes received via DHCP. + +
+ +
+ +
+ +ipv4 bool + +
+
+ +Enables DHCPv4 protocol for the interface (default is enabled). + +
+ +
+ +
+ +ipv6 bool + +
+
+ +Enables DHCPv6 protocol for the interface (default is disabled). + +
+ +
+ + + + + +## DeviceWireguardConfig +DeviceWireguardConfig contains settings for configuring Wireguard network interface. + +Appears in: + + +- Device.wireguard + + +``` yaml +privateKey: ABCDEF... # Specifies a private key configuration (base64 encoded). +listenPort: 51111 # Specifies a device's listening port. +# Specifies a list of peer configurations to apply to a device. +peers: + - publicKey: ABCDEF... # Specifies the public key of this peer. + endpoint: 192.168.1.3 # Specifies the endpoint of this peer entry. + # AllowedIPs specifies a list of allowed IP addresses in CIDR notation for this peer. + allowedIPs: + - 192.168.1.0/24 +``` +``` yaml +privateKey: ABCDEF... # Specifies a private key configuration (base64 encoded). +# Specifies a list of peer configurations to apply to a device. +peers: + - publicKey: ABCDEF... # Specifies the public key of this peer. + endpoint: 192.168.1.2 # Specifies the endpoint of this peer entry. + persistentKeepaliveInterval: 10s # Specifies the persistent keepalive interval for this peer. + # AllowedIPs specifies a list of allowed IP addresses in CIDR notation for this peer. + allowedIPs: + - 192.168.1.0/24 +``` + +
+ +
+ +privateKey string + +
+
+ +Specifies a private key configuration (base64 encoded). +Can be generated by `wg genkey`. + +
+ +
+ +
+ +listenPort int + +
+
+ +Specifies a device's listening port. + +
+ +
+ +
+ +firewallMark int + +
+
+ +Specifies a device's firewall mark. + +
+ +
+ +
+ +peers []DeviceWireguardPeer + +
+
+ +Specifies a list of peer configurations to apply to a device. + +
+ +
+ + + + + +## DeviceWireguardPeer +DeviceWireguardPeer a WireGuard device peer configuration. + +Appears in: + + +- DeviceWireguardConfig.peers + + + +
+ +
+ +publicKey string + +
+
+ +Specifies the public key of this peer. +Can be extracted from private key by running `wg pubkey < private.key > public.key && cat public.key`. + +
+ +
+ +
+ +endpoint string + +
+
+ +Specifies the endpoint of this peer entry. + +
+ +
+ +
+ +persistentKeepaliveInterval Duration + +
+
+ +Specifies the persistent keepalive interval for this peer. +Field format accepts any Go time.Duration format ('1h' for one hour, '10m' for ten minutes). + +
+ +
+ +
+ +allowedIPs []string + +
+
+ +AllowedIPs specifies a list of allowed IP addresses in CIDR notation for this peer. + +
+ +
+ + + + + +## DeviceVIPConfig +DeviceVIPConfig contains settings for configuring a Virtual Shared IP on an interface. + +Appears in: + + +- Device.vip + + +``` yaml +ip: 172.16.199.55 # Specifies the IP address to be used. +``` + +
+ +
+ +ip string + +
+
+ +Specifies the IP address to be used. + +
+ +
+ + + + + +## Bond +Bond contains the various options for configuring a bonded interface. + +Appears in: + + +- Device.bond + + +``` yaml +# The interfaces that make up the bond. +interfaces: + - eth0 + - eth1 +mode: 802.3ad # A bond option. +lacpRate: fast # A bond option. +``` + +
+ +
+ +interfaces []string + +
+
+ +The interfaces that make up the bond. + +
+ +
+ +
+ +arpIPTarget []string + +
+
+ +A bond option. +Please see the official kernel documentation. +Not supported at the moment. + +
+ +
+ +
+ +mode string + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +xmitHashPolicy string + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +lacpRate string + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +adActorSystem string + +
+
+ +A bond option. +Please see the official kernel documentation. +Not supported at the moment. + +
+ +
+ +
+ +arpValidate string + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +arpAllTargets string + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +primary string + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +primaryReselect string + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +failOverMac string + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +adSelect string + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +miimon uint32 + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +updelay uint32 + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +downdelay uint32 + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +arpInterval uint32 + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +resendIgmp uint32 + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +minLinks uint32 + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +lpInterval uint32 + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +packetsPerSlave uint32 + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +numPeerNotif uint8 + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +tlbDynamicLb uint8 + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +allSlavesActive uint8 + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +useCarrier bool + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +adActorSysPrio uint16 + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +adUserPortKey uint16 + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ +
+ +peerNotifyDelay uint32 + +
+
+ +A bond option. +Please see the official kernel documentation. + +
+ +
+ + + + + +## Vlan +Vlan represents vlan settings for a device. + +Appears in: + + +- Device.vlans + + + +
+ +
+ +cidr string + +
+
+ +The CIDR to use. + +
+ +
+ +
+ +routes []Route + +
+
+ +A list of routes associated with the VLAN. + +
+ +
+ +
+ +dhcp bool + +
+
+ +Indicates if DHCP should be used. + +
+ +
+ +
+ +vlanId uint16 + +
+
+ +The VLAN's ID. + +
+ +
+ + + + + +## Route +Route represents a network route. + +Appears in: + + +- Device.routes + +- Vlan.routes + + +``` yaml +- network: 0.0.0.0/0 # The route's network. + gateway: 10.5.0.1 # The route's gateway. +- network: 10.2.0.0/16 # The route's network. + gateway: 10.2.0.1 # The route's gateway. +``` + +
+ +
+ +network string + +
+
+ +The route's network. + +
+ +
+ +
+ +gateway string + +
+
+ +The route's gateway. + +
+ +
+ +
+ +metric uint32 + +
+
+ +The optional metric for the route. + +
+ +
+ + + + + +## RegistryMirrorConfig +RegistryMirrorConfig represents mirror configuration for a registry. + +Appears in: + + +- RegistriesConfig.mirrors + + +``` yaml +ghcr.io: + # List of endpoints (URLs) for registry mirrors to use. + endpoints: + - https://registry.insecure + - https://ghcr.io/v2/ +``` + +
+ +
+ +endpoints []string + +
+
+ +List of endpoints (URLs) for registry mirrors to use. +Endpoint configures HTTP/HTTPS access mode, host name, +port and path (if path is not set, it defaults to `/v2`). + +
+ +
+ + + + + +## RegistryConfig +RegistryConfig specifies auth & TLS config per registry. + +Appears in: + + +- RegistriesConfig.config + + +``` yaml +registry.insecure: + # The TLS configuration for the registry. + tls: + insecureSkipVerify: true # Skip TLS server certificate verification (not recommended). + + # # Enable mutual TLS authentication with the registry. + # clientIdentity: + # crt: TFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVSklla05DTUhGLi4u + # key: TFMwdExTMUNSVWRKVGlCRlJESTFOVEU1SUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLVFVNLi4u + + # # The auth configuration for this registry. + # auth: + # username: username # Optional registry authentication. + # password: password # Optional registry authentication. +``` + +
+ +
+ +tls RegistryTLSConfig + +
+
+ +The TLS configuration for the registry. + + + +Examples: + + +``` yaml +tls: + # Enable mutual TLS authentication with the registry. + clientIdentity: + crt: TFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVSklla05DTUhGLi4u + key: TFMwdExTMUNSVWRKVGlCRlJESTFOVEU1SUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLVFVNLi4u +``` + +``` yaml +tls: + insecureSkipVerify: true # Skip TLS server certificate verification (not recommended). + + # # Enable mutual TLS authentication with the registry. + # clientIdentity: + # crt: TFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVSklla05DTUhGLi4u + # key: TFMwdExTMUNSVWRKVGlCRlJESTFOVEU1SUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLVFVNLi4u +``` + + +
+ +
+ +
+ +auth RegistryAuthConfig + +
+
+ +The auth configuration for this registry. + + + +Examples: + + +``` yaml +auth: + username: username # Optional registry authentication. + password: password # Optional registry authentication. +``` + + +
+ +
+ + + + + +## RegistryAuthConfig +RegistryAuthConfig specifies authentication configuration for a registry. + +Appears in: + + +- RegistryConfig.auth + + +``` yaml +username: username # Optional registry authentication. +password: password # Optional registry authentication. +``` + +
+ +
+ +username string + +
+
+ +Optional registry authentication. +The meaning of each field is the same with the corresponding field in .docker/config.json. + +
+ +
+ +
+ +password string + +
+
+ +Optional registry authentication. +The meaning of each field is the same with the corresponding field in .docker/config.json. + +
+ +
+ +
+ +auth string + +
+
+ +Optional registry authentication. +The meaning of each field is the same with the corresponding field in .docker/config.json. + +
+ +
+ +
+ +identityToken string + +
+
+ +Optional registry authentication. +The meaning of each field is the same with the corresponding field in .docker/config.json. + +
+ +
+ + + + + +## RegistryTLSConfig +RegistryTLSConfig specifies TLS config for HTTPS registries. + +Appears in: + + +- RegistryConfig.tls + + +``` yaml +# Enable mutual TLS authentication with the registry. +clientIdentity: + crt: TFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVSklla05DTUhGLi4u + key: TFMwdExTMUNSVWRKVGlCRlJESTFOVEU1SUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLVFVNLi4u +``` +``` yaml +insecureSkipVerify: true # Skip TLS server certificate verification (not recommended). + +# # Enable mutual TLS authentication with the registry. +# clientIdentity: +# crt: TFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVSklla05DTUhGLi4u +# key: TFMwdExTMUNSVWRKVGlCRlJESTFOVEU1SUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLVFVNLi4u +``` + +
+ +
+ +clientIdentity PEMEncodedCertificateAndKey + +
+
+ +Enable mutual TLS authentication with the registry. +Client certificate and key should be base64-encoded. + + + +Examples: + + +``` yaml +clientIdentity: + crt: TFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVSklla05DTUhGLi4u + key: TFMwdExTMUNSVWRKVGlCRlJESTFOVEU1SUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLVFVNLi4u +``` + + +
+ +
+ +
+ +ca Base64Bytes + +
+
+ +CA registry certificate to add the list of trusted certificates. +Certificate should be base64-encoded. + +
+ +
+ +
+ +insecureSkipVerify bool + +
+
+ +Skip TLS server certificate verification (not recommended). + +
+ +
+ + + + + +## SystemDiskEncryptionConfig +SystemDiskEncryptionConfig specifies system disk partitions encryption settings. + +Appears in: + + +- MachineConfig.systemDiskEncryption + + +``` yaml +# Ephemeral partition encryption. +ephemeral: + provider: luks2 # Encryption provider to use for the encryption. + # Defines the encryption keys generation and storage method. + keys: + - # Deterministically generated key from the node UUID and PartitionLabel. + nodeID: {} + slot: 0 # Key slot number for luks2 encryption. +``` + +
+ +
+ +state EncryptionConfig + +
+
+ +State partition encryption. + +
+ +
+ +
+ +ephemeral EncryptionConfig + +
+
+ +Ephemeral partition encryption. + +
+ +
+ + + + + +## FeaturesConfig +FeaturesConfig describe individual Talos features that can be switched on or off. + +Appears in: + + +- MachineConfig.features + + +``` yaml +rbac: true # Enable role-based access control (RBAC). +``` + +
+ +
+ +rbac bool + +
+
+ +Enable role-based access control (RBAC). + +
+ +
+ + + + + +## VolumeMountConfig +VolumeMountConfig struct describes extra volume mount for the static pods. + +Appears in: + + +- APIServerConfig.extraVolumes + +- ControllerManagerConfig.extraVolumes + +- SchedulerConfig.extraVolumes + + + +
+ +
+ +hostPath string + +
+
+ +Path on the host. + + + +Examples: + + +``` yaml +hostPath: /var/lib/auth +``` + + +
+ +
+ +
+ +mountPath string + +
+
+ +Path in the container. + + + +Examples: + + +``` yaml +mountPath: /etc/kubernetes/auth +``` + + +
+ +
+ +
+ +readonly bool + +
+
+ +Mount the volume read only. + + + +Examples: + + +``` yaml +readonly: true +``` + + +
+ +
+ + + + + +## ClusterInlineManifest +ClusterInlineManifest struct describes inline bootstrap manifests for the user. + + + + +
+ +
+ +name string + +
+
+ +Name of the manifest. +Name should be unique. + + + +Examples: + + +``` yaml +name: csi +``` + + +
+ +
+ +
+ +contents string + +
+
+ +Manifest contents as a string. + + + +Examples: + + +``` yaml +contents: /etc/kubernetes/auth +``` + + +
+ +
+ + + + diff --git a/website/content/docs/v0.12/Reference/kernel.md b/website/content/docs/v0.12/Reference/kernel.md new file mode 100644 index 0000000000..de2285852a --- /dev/null +++ b/website/content/docs/v0.12/Reference/kernel.md @@ -0,0 +1,107 @@ +--- +title: Kernel +desription: Linux kernel reference. +--- + +## Commandline Parameters + +Talos supports a number of kernel commandline parameters. Some are required for +it to operate. Others are optional and useful in certain circumstances. + +Several of these are enforced by the Kernel Self Protection Project [KSPP](https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project/Recommended_Settings). + +**Required** parameters: + +- `talos.config`: the HTTP(S) URL at which the machine configuration data can be found +- `talos.platform`: can be one of `aws`, `azure`, `container`, `digitalocean`, `gcp`, `metal`, `packet`, or `vmware` +- `init_on_alloc=1`: required by KSPP +- `slab_nomerge`: required by KSPP +- `pti=on`: required by KSPP + +**Recommended** parameters: + + - `init_on_free=1`: advised by KSPP if minimizing stale data lifetime is + important + +### Available Talos-specific parameters + +#### `panic` + + The amount of time to wait after a panic before a reboot is issued. + + Talos will always reboot if it encounters an unrecoverable error. + However, when collecting debug information, it may reboot too quickly for + humans to read the logs. + This option allows the user to delay the reboot to give time to collect debug + information from the console screen. + + A value of `0` disables automtic rebooting entirely. + +#### `talos.config` + + The URL at which the machine configuration data may be found. + +#### `talos.platform` + + The platform name on which Talos will run. + + Valid options are: + - `aws` + - `azure` + - `container` + - `digitalocean` + - `gcp` + - `metal` + - `packet` + - `vmware` + +#### `talos.board` + + The board name, if Talos is being used on an ARM64 SBC. + + Supported boards are: + - `bananapi_m64`: Banana Pi M64 + - `libretech_all_h3_cc_h5`: Libre Computer ALL-H3-CC + - `rock64`: Pine64 Rock64 + - `rpi_4`: Raspberry Pi 4, Model B + +#### `talos.hostname` + + The hostname to be used. + The hostname is generally specified in the machine config. + However, in some cases, the DHCP server needs to know the hostname + before the machine configuration has been acquired. + + Unless specifically required, the machine configuration should be used + instead. + +#### `talos.interface` + + The network interface to use for pre-configuration booting. + + If the node has multiple network interfaces, you may specify which interface + to use by setting this option. + + Keep in mind that Talos uses indexed interface names (eth0, eth1, etc) and not + "predictable" interface names (enp2s0) or BIOS-enumerated (eno1) names. + +#### `talos.shutdown` + + The type of shutdown to use when Talos is told to shutdown. + + Valid options are: + - `halt` + - `poweroff` + +#### `talos.network.interface.ignore` + + A network interface which should be ignored and not configured by Talos. + + Before a configuration is applied (early on each boot), Talos attempts to + configure each network interface by DHCP. + If there are many network interfaces on the machine which have link but no + DHCP server, this can add significant boot delays. + + This option may be specified multiple times for multiple network interfaces. + + diff --git a/website/content/docs/v0.12/Reference/platform.md b/website/content/docs/v0.12/Reference/platform.md new file mode 100644 index 0000000000..ade1369b06 --- /dev/null +++ b/website/content/docs/v0.12/Reference/platform.md @@ -0,0 +1,9 @@ +--- +title: Platform +--- + +### Metal + +Below is a image to visualize the process of bootstrapping nodes. + + diff --git a/website/content/docs/v0.12/Single Board Computers/bananapi_m64.md b/website/content/docs/v0.12/Single Board Computers/bananapi_m64.md new file mode 100644 index 0000000000..bc48c4c61d --- /dev/null +++ b/website/content/docs/v0.12/Single Board Computers/bananapi_m64.md @@ -0,0 +1,57 @@ +--- +title: "Banana Pi M64" +description: "Installing Talos on Banana Pi M64 SBC using raw disk image." +--- + +## Prerequisites + +You will need + +- `talosctl` +- an SD card + +Download the latest alpha `talosctl`. + +```bash +curl -Lo /usr/local/bin/talosctl https://github.com/talos-systems/talos/releases/latest/download/talosctl-$(uname -s | tr "[:upper:]" "[:lower:]")-amd64 +chmod +x /usr/local/bin/talosctl +``` + +## Download the Image + +Download the image and decompress it: + +```bash +curl -LO https://github.com/talos-systems/talos/releases/latest/download/metal-bananapi_m64-arm64.img.xz +xz -d metal-bananapi_m64-arm64.img.xz +``` + +## Writing the Image + +The path to your SD card can be found using `fdisk` on Linux or `diskutil` on macOS. +In this example, we will assume `/dev/mmcblk0`. + +Now `dd` the image to your SD card: + +```bash +sudo dd if=metal-bananapi_m64-arm64.img of=/dev/mmcblk0 conv=fsync bs=4M +``` + +## Bootstrapping the Node + +Insert the SD card to your board, turn it on and wait for the console to show you the instructions for bootstrapping the node. +Following the instructions in the console output to connect to the interactive installer: + +```bash +talosctl apply-config --insecure --interactive --nodes +``` + +Once the interactive installation is applied, the cluster will form and you can then use `kubectl`. + +## Retrieve the `kubeconfig` + +Retrieve the admin `kubeconfig` by running: + +```bash +talosctl kubeconfig +``` diff --git a/website/content/docs/v0.12/Single Board Computers/libretech_all_h3_cc_h5.md b/website/content/docs/v0.12/Single Board Computers/libretech_all_h3_cc_h5.md new file mode 100644 index 0000000000..a0b7e8f2ac --- /dev/null +++ b/website/content/docs/v0.12/Single Board Computers/libretech_all_h3_cc_h5.md @@ -0,0 +1,57 @@ +--- +title: "Libre Computer Board ALL-H3-CC" +description: "Installing Talos on Libre Computer Board ALL-H3-CC SBC using raw disk image." +--- + +## Prerequisites + +You will need + +- `talosctl` +- an SD card + +Download the latest alpha `talosctl`. + +```bash +curl -Lo /usr/local/bin/talosctl https://github.com/talos-systems/talos/releases/latest/download/talosctl-$(uname -s | tr "[:upper:]" "[:lower:]")-amd64 +chmod +x /usr/local/bin/talosctl +``` + +## Download the Image + +Download the image and decompress it: + +```bash +curl -LO https://github.com/talos-systems/talos/releases/latest/download/metal-libretech_all_h3_cc_h5-arm64.img.xz +xz -d metal-libretech_all_h3_cc_h5-arm64.img.xz +``` + +## Writing the Image + +The path to your SD card can be found using `fdisk` on Linux or `diskutil` on macOS. +In this example, we will assume `/dev/mmcblk0`. + +Now `dd` the image to your SD card: + +```bash +sudo dd if=metal-libretech_all_h3_cc_h5-arm64.img of=/dev/mmcblk0 conv=fsync bs=4M +``` + +## Bootstrapping the Node + +Insert the SD card to your board, turn it on and wait for the console to show you the instructions for bootstrapping the node. +Following the instructions in the console output to connect to the interactive installer: + +```bash +talosctl apply-config --insecure --interactive --nodes +``` + +Once the interactive installation is applied, the cluster will form and you can then use `kubectl`. + +## Retrieve the `kubeconfig` + +Retrieve the admin `kubeconfig` by running: + +```bash +talosctl kubeconfig +``` diff --git a/website/content/docs/v0.12/Single Board Computers/pine64.md b/website/content/docs/v0.12/Single Board Computers/pine64.md new file mode 100644 index 0000000000..bc30430b3e --- /dev/null +++ b/website/content/docs/v0.12/Single Board Computers/pine64.md @@ -0,0 +1,57 @@ +--- +title: "Pine64" +description: "Installing Talos on a Pine64 SBC using raw disk image." +--- + +## Prerequisites + +You will need + +- `talosctl` +- an SD card + +Download the latest alpha `talosctl`. + +```bash +curl -Lo /usr/local/bin/talosctl https://github.com/talos-systems/talos/releases/latest/download/talosctl-$(uname -s | tr "[:upper:]" "[:lower:]")-amd64 +chmod +x /usr/local/bin/talosctl +``` + +## Download the Image + +Download the image and decompress it: + +```bash +curl -LO https://github.com/talos-systems/talos/releases/latest/download/metal-pine64-arm64.img.xz +xz -d metal-pine64-arm64.img.xz +``` + +## Writing the Image + +The path to your SD card can be found using `fdisk` on Linux or `diskutil` on macOS. +In this example, we will assume `/dev/mmcblk0`. + +Now `dd` the image to your SD card: + +```bash +sudo dd if=metal-pine64-arm64.img of=/dev/mmcblk0 conv=fsync bs=4M +``` + +## Bootstrapping the Node + +Insert the SD card to your board, turn it on and wait for the console to show you the instructions for bootstrapping the node. +Following the instructions in the console output to connect to the interactive installer: + +```bash +talosctl apply-config --insecure --interactive --nodes +``` + +Once the interactive installation is applied, the cluster will form and you can then use `kubectl`. + +## Retrieve the `kubeconfig` + +Retrieve the admin `kubeconfig` by running: + +```bash +talosctl kubeconfig +``` diff --git a/website/content/docs/v0.12/Single Board Computers/rock64.md b/website/content/docs/v0.12/Single Board Computers/rock64.md new file mode 100644 index 0000000000..27827e8ae5 --- /dev/null +++ b/website/content/docs/v0.12/Single Board Computers/rock64.md @@ -0,0 +1,57 @@ +--- +title: "Pine64 Rock64" +description: "Installing Talos on Pine64 Rock64 SBC using raw disk image." +--- + +## Prerequisites + +You will need + +- `talosctl` +- an SD card + +Download the latest alpha `talosctl`. + +```bash +curl -Lo /usr/local/bin/talosctl https://github.com/talos-systems/talos/releases/latest/download/talosctl-$(uname -s | tr "[:upper:]" "[:lower:]")-amd64 +chmod +x /usr/local/bin/talosctl +``` + +## Download the Image + +Download the image and decompress it: + +```bash +curl -LO https://github.com/talos-systems/talos/releases/latest/download/metal-rock64-arm64.img.xz +xz -d metal-rock64-arm64.img.xz +``` + +## Writing the Image + +The path to your SD card can be found using `fdisk` on Linux or `diskutil` on macOS. +In this example, we will assume `/dev/mmcblk0`. + +Now `dd` the image to your SD card: + +```bash +sudo dd if=metal-rock64-arm64.img of=/dev/mmcblk0 conv=fsync bs=4M +``` + +## Bootstrapping the Node + +Insert the SD card to your board, turn it on and wait for the console to show you the instructions for bootstrapping the node. +Following the instructions in the console output to connect to the interactive installer: + +```bash +talosctl apply-config --insecure --interactive --nodes +``` + +Once the interactive installation is applied, the cluster will form and you can then use `kubectl`. + +## Retrieve the `kubeconfig` + +Retrieve the admin `kubeconfig` by running: + +```bash +talosctl kubeconfig +``` diff --git a/website/content/docs/v0.12/Single Board Computers/rockpi_4.md b/website/content/docs/v0.12/Single Board Computers/rockpi_4.md new file mode 100644 index 0000000000..70888807ea --- /dev/null +++ b/website/content/docs/v0.12/Single Board Computers/rockpi_4.md @@ -0,0 +1,93 @@ +--- +title: "Radxa ROCK PI 4c" +description: "Installing Talos on Radxa ROCK PI 4c SBC using raw disk image." +--- + +## Prerequisites + +You will need + +- `talosctl` +- an SD card + +Download the latest alpha `talosctl`. + +```bash +curl -Lo /usr/local/bin/talosctl https://github.com/talos-systems/talos/releases/latest/download/talosctl-$(uname -s | tr "[:upper:]" "[:lower:]")-amd64 +chmod +x /usr/local/bin/talosctl +``` + +## Download the Image + +Download the image and decompress it: + +```bash +curl -LO https://github.com/talos-systems/talos/releases/latest/download/metal-rockpi_4-arm64.img.xz +xz -d metal-rockpi_4-arm64.img.xz +``` + +## Writing the Image + +The path to your SD card can be found using `fdisk` on Linux or `diskutil` on macOS. +In this example, we will assume `/dev/mmcblk0`. + +Now `dd` the image to your SD card: + +```bash +sudo dd if=metal-rockpi_4-arm64.img of=/dev/mmcblk0 conv=fsync bs=4M +``` + +## Bootstrapping the Node + +Insert the SD card to your board, turn it on and wait for the console to show you the instructions for bootstrapping the node. +Following the instructions in the console output to connect to the interactive installer: + +```bash +talosctl apply-config --insecure --interactive --nodes +``` + +Once the interactive installation is applied, the cluster will form and you can then use `kubectl`. + +## Retrieve the `kubeconfig` + +Retrieve the admin `kubeconfig` by running: + +```bash +talosctl kubeconfig +``` + +## Boot Talos from an SSD Drive + +> Note: this is only tested on Rock PI 4c + +Rock PI 4 has an M2 slot which supports NVMe disks. +It is possible to run Talos without any SD cards right from that SSD disk. + +The pre-installed SPI loader won't be able to chain Talos u-boot on the SSD drive because it's too outdated. +The official docs on booting from the SSD also propose using an outdated SPI to flash u-boot. + +Instead, it is necessary to update u-boot to a more recent version for this process to work. +The Armbian u-boot build for Rock PI 4c has been proved to work: [https://users.armbian.com/piter75/](https://users.armbian.com/piter75/). + +### Steps + +- Flash any OS to the SD card (can be Armbian for example). +- Download Armbian u-boot and update SPI flash: + +```bash +curl -LO https://users.armbian.com/piter75/rkspi_loader-v20.11.2-trunk-v2.img +sudo dd if=rkspi_loader-v20.11.2-trunk-v2.img of=/dev/mtdblock0 bs=4K +``` + +- Optionally, you can also write Talos image to the SSD drive right from your Rock PI board: + +```bash +curl -LO https://github.com/talos-systems/talos/releases/latest/download/metal-rockpi_4-arm64.img.xz +xz -d metal-rockpi_4-arm64.img.xz +sudo dd if=metal-rockpi_4-arm64.img.xz of=/dev/nvme0n1 +``` + +- remove SD card and reboot. + +After these steps, Talos will boot from the SSD and enter maintenance mode. +The rest of the flow is the same as running Talos from the SD card. diff --git a/website/content/docs/v0.12/Single Board Computers/rpi_4.md b/website/content/docs/v0.12/Single Board Computers/rpi_4.md new file mode 100644 index 0000000000..c2bff56171 --- /dev/null +++ b/website/content/docs/v0.12/Single Board Computers/rpi_4.md @@ -0,0 +1,109 @@ +--- +title: "Raspberry Pi 4 Model B" +description: "Installing Talos on Rpi4 SBC using raw disk image." +--- + +## Video Walkthrough + +To see a live demo of this writeup, see the video below: + + +## Prerequisites + +You will need + +- `talosctl` +- an SD card + +Download the latest alpha `talosctl`. + +```bash +curl -Lo /usr/local/bin/talosctl https://github.com/talos-systems/talos/releases/latest/download/talosctl-$(uname -s | tr "[:upper:]" "[:lower:]")-amd64 +chmod +x /usr/local/bin/talosctl +``` + +## Updating the EEPROM + +At least version `v2020.09.03-138a1` of the bootloader (`rpi-eeprom`) is required. +To update the bootloader we will need an SD card. +Insert the SD card into your computer and use [Raspberry Pi Imager](https://www.raspberrypi.org/software/) +to install the bootloader on it (select Operating System > Misc utility images > Bootloader > SD Card Boot). +Alternatively, you can use the console on Linux or macOS. +The path to your SD card can be found using `fdisk` on Linux or `diskutil` on macOS. +In this example, we will assume `/dev/mmcblk0`. + +```bash +curl -Lo rpi-boot-eeprom-recovery.zip https://github.com/raspberrypi/rpi-eeprom/releases/download/v2021.04.29-138a1/rpi-boot-eeprom-recovery-2021-04-29-vl805-000138a1.zip +sudo mkfs.fat -I /dev/mmcblk0 +sudo mount /dev/mmcblk0p1 /mnt +sudo bsdtar rpi-boot-eeprom-recovery.zip -C /mnt +``` + +Remove the SD card from your local machine and insert it into the Raspberry Pi. +Power the Raspberry Pi on, and wait at least 10 seconds. +If successful, the green LED light will blink rapidly (forever), otherwise an error pattern will be displayed. +If an HDMI display is attached to the port closest to the power/USB-C port, +the screen will display green for success or red if a failure occurs. +Power off the Raspberry Pi and remove the SD card from it. + +> Note: Updating the bootloader only needs to be done once. + +## Download the Image + +Download the image and decompress it: + +```bash +curl -LO https://github.com/talos-systems/talos/releases/latest/download/metal-rpi_4-arm64.img.xz +xz -d metal-rpi_4-arm64.img.xz +``` + +## Writing the Image + +Now `dd` the image to your SD card: + +```bash +sudo dd if=metal-rpi_4-arm64.img of=/dev/mmcblk0 conv=fsync bs=4M +``` + +## Bootstrapping the Node + +Insert the SD card to your board, turn it on and wait for the console to show you the instructions for bootstrapping the node. +Following the instructions in the console output to connect to the interactive installer: + +```bash +talosctl apply-config --insecure --interactive --nodes +``` + +Once the interactive installation is applied, the cluster will form and you can then use `kubectl`. + +> Note: if you have an HDMI display attached and it shows only a rainbow splash, +> please use the other HDMI port, the one closest to the power/USB-C port. + +## Retrieve the `kubeconfig` + +Retrieve the admin `kubeconfig` by running: + +```bash +talosctl kubeconfig +``` + +## Troubleshooting + +The following table can be used to troubleshoot booting issues: + +| Long Flashes | Short Flashes | Status | +| ------------ | :-----------: | ----------------------------------: | +| 0 | 3 | Generic failure to boot | +| 0 | 4 | start\*.elf not found | +| 0 | 7 | Kernel image not found | +| 0 | 8 | SDRAM failure | +| 0 | 9 | Insufficient SDRAM | +| 0 | 10 | In HALT state | +| 2 | 1 | Partition not FAT | +| 2 | 2 | Failed to read from partition | +| 2 | 3 | Extended partition not FAT | +| 2 | 4 | File signature/hash mismatch - Pi 4 | +| 4 | 4 | Unsupported board type | +| 4 | 5 | Fatal firmware error | +| 4 | 6 | Power failure type A | +| 4 | 7 | Power failure type B | diff --git a/website/content/docs/v0.12/Virtualized Platforms/hyper-v.md b/website/content/docs/v0.12/Virtualized Platforms/hyper-v.md new file mode 100644 index 0000000000..8093a2c5c4 --- /dev/null +++ b/website/content/docs/v0.12/Virtualized Platforms/hyper-v.md @@ -0,0 +1,5 @@ +--- +title: "Hyper-V" +--- + +Talos is known to work on Hyper-V; however, it is currently undocumented. diff --git a/website/content/docs/v0.12/Virtualized Platforms/kvm.md b/website/content/docs/v0.12/Virtualized Platforms/kvm.md new file mode 100644 index 0000000000..012fa73756 --- /dev/null +++ b/website/content/docs/v0.12/Virtualized Platforms/kvm.md @@ -0,0 +1,5 @@ +--- +title: "KVM" +--- + +Talos is known to work on KVM; however, it is currently undocumented. diff --git a/website/content/docs/v0.12/Virtualized Platforms/proxmox.md b/website/content/docs/v0.12/Virtualized Platforms/proxmox.md new file mode 100644 index 0000000000..ed5a2c70c9 --- /dev/null +++ b/website/content/docs/v0.12/Virtualized Platforms/proxmox.md @@ -0,0 +1,218 @@ +--- +title: Proxmox +description: "Creating Talos Kubernetes cluster using Proxmox." +--- + +In this guide we will create a Kubernetes cluster using Proxmox. + +## Video Walkthrough + +To see a live demo of this writeup, visit Youtube here: + + + +## Installation + +### How to Get Proxmox + +It is assumed that you have already installed Proxmox onto the server you wish to create Talos VMs on. +Visit the [Proxmox](https://www.proxmox.com/en/downloads) downloads page if necessary. + +### Install talosctl + +You can download `talosctl` via +[github.com/talos-systems/talos/releases](https://github.com/talos-systems/talos/releases) + +```bash +curl https://github.com/talos-systems/talos/releases/download//talosctl-- -L -o talosctl +``` + +For example version `v0.11.0` for `linux` platform: + +```bash +curl https://github.com/talos-systems/talos/releases/latest/download/talosctl-linux-amd64 -L -o talosctl +sudo cp talosctl /usr/local/bin +sudo chmod +x /usr/local/bin/talosctl +``` + +### Download ISO Image + +In order to install Talos in Proxmox, you will need the ISO image from the Talos release page. +You can download `talos-amd64.iso` via +[github.com/talos-systems/talos/releases](https://github.com/talos-systems/talos/releases) + +```bash +mkdir -p _out/ +curl https://github.com/talos-systems/talos/releases/download//talos-.iso -L -o _out/talos-.iso +``` + +For example version `v0.11.0` for `linux` platform: + +```bash +mkdir -p _out/ +curl https://github.com/talos-systems/talos/releases/latest/download/talos-amd64.iso -L -o _out/talos-amd64.iso +``` + +## Upload ISO + +From the Proxmox UI, select the "local" storage and enter the "Content" section. +Click the "Upload" button: + + + +Select the ISO you downloaded previously, then hit "Upload" + + + +## Create VMs + +Start by creating a new VM by clicking the "Create VM" button in the Proxmox UI: + + + +Fill out a name for the new VM: + + + +In the OS tab, select the ISO we uploaded earlier: + + + +Keep the defaults set in the "System" tab. + +Keep the defaults in the "Hard Disk" tab as well, only changing the size if desired. + +In the "CPU" section, give at least 2 cores to the VM: + + + +Verify that the RAM is set to at least 2GB: + + + +Keep the default values for networking, verifying that the VM is set to come up on the bridge interface: + + + +Finish creating the VM by clicking through the "Confirm" tab and then "Finish". + +Repeat this process for a second VM to use as a worker node. +You can also repeat this for additional nodes desired. + +## Start Control Plane Node + +Once the VMs have been created and updated, start the VM that will be the first control plane node. +This VM will boot the ISO image specified earlier and enter "maintenance mode". + +### With DHCP server + +Once the machine has entered maintenance mode, there will be a console log that details the IP address that the node received. +Take note of this IP address, which will be referred to as `$CONTROL_PLANE_IP` for the rest of this guide. +If you wish to export this IP as a bash variable, simply issue a command like `export CONTROL_PLANE_IP=1.2.3.4`. + + + +### Without DHCP server + +To apply the machine configurations in maintenance mode, VM has to have IP on the network. +So you can set it on boot time manualy. + + + +Press `e` on the boot time. +And set the IP parameters for the VM. +[Format is](https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt): + +```bash +ip=:::::: +``` + +For example $CONTROL_PLANE_IP will be 192.168.0.100 and gateway 192.168.0.1 + +```bash +linux /boot/vmlinuz init_on_alloc=1 slab_nomerge pti=on panic=0 consoleblank=0 printk.devkmsg=on earlyprintk=ttyS0 console=tty0 console=ttyS0 talos.platform=metal ip=192.168.0.100::192.168.0.1:255.255.255.0::eth0:off +``` + + + +Then press Ctrl-x or F10 + +## Generate Machine Configurations + +With the IP address above, you can now generate the machine configurations to use for installing Talos and Kubernetes. +Issue the following command, updating the output directory, cluster name, and control plane IP as you see fit: + +```bash +talosctl gen config talos-vbox-cluster https://$CONTROL_PLANE_IP:6443 --output-dir _out +``` + +This will create several files in the `_out` directory: controlplane.yaml, join.yaml, and talosconfig. + +## Create Control Plane Node + +Using the `controlplane.yaml` generated above, you can now apply this config using talosctl. +Issue: + +```bash +talosctl apply-config --insecure --nodes $CONTROL_PLANE_IP --file _out/controlplan.yaml +``` + +You should now see some action in the Proxmox console for this VM. +Talos will be installed to disk, the VM will reboot, and then Talos will configure the Kubernetes control plane on this VM. + +> Note: This process can be repeated multiple times to create an HA control plane. + +## Create Worker Node + +Create at least a single worker node using a process similar to the control plane creation above. +Start the worker node VM and wait for it to enter "maintenance mode". +Take note of the worker node's IP address, which will be referred to as `$WORKER_IP` + +Issue: + +```bash +talosctl apply-config --insecure --nodes $WORKER_IP --file _out/join.yaml +``` + +> Note: This process can be repeated multiple times to add additional workers. + +## Using the Cluster + +Once the cluster is available, you can make use of `talosctl` and `kubectl` to interact with the cluster. +For example, to view current running containers, run `talosctl containers` for a list of containers in the `system` namespace, or `talosctl containers -k` for the `k8s.io` namespace. +To view the logs of a container, use `talosctl logs ` or `talosctl logs -k `. + +First, configure talosctl to talk to your control plane node by issuing the following, updating paths and IPs as necessary: + +```bash +export TALOSCONFIG="_out/talosconfig" +talosctl config endpoint $CONTROL_PLANE_IP +talosctl config node $CONTROL_PLANE_IP +``` + +### Bootstrap Etcd + +Set the `endpoints` and `nodes`: + +```bash +talosctl --talosconfig talosconfig config endpoint +talosctl --talosconfig talosconfig config node +``` + +Bootstrap `etcd`: + +```bash +talosctl --talosconfig talosconfig bootstrap +``` + +### Retrieve the `kubeconfig` + +At this point we can retrieve the admin `kubeconfig` by running: + +```bash +talosctl --talosconfig talosconfig kubeconfig . +``` + +## Cleaning Up + +To cleanup, simply stop and delete the virtual machines from the Proxmox UI. diff --git a/website/content/docs/v0.12/Virtualized Platforms/vmware.md b/website/content/docs/v0.12/Virtualized Platforms/vmware.md new file mode 100644 index 0000000000..759155eda5 --- /dev/null +++ b/website/content/docs/v0.12/Virtualized Platforms/vmware.md @@ -0,0 +1,214 @@ +--- +title: "VMware" +description: "Creating Talos Kubernetes cluster using VMware." +--- + +## Creating a Cluster via the `govc` CLI + +In this guide we will create an HA Kubernetes cluster with 3 worker nodes. +We will use the `govc` cli which can be downloaded [here](https://github.com/vmware/govmomi/tree/master/govc#installation). + +### Prerequisites + +Prior to starting, it is important to have the following infrastructure in place and available: + +- DHCP server +- Load Balancer or DNS address for cluster endpoint + - If using a load balancer, the most common setup is to balance `tcp/443` across the control plane nodes `tcp/6443` + - If using a DNS address, the A record should return back the addresses of the control plane nodes + +### Create the Machine Configuration Files + +#### Generating Base Configurations + +Using the DNS name or name of the loadbalancer used in the prereq steps, generate the base configuration files for the Talos machines: + +```bash +$ talosctl gen config talos-k8s-vmware-tutorial https://: +created controlplane.yaml +created join.yaml +created talosconfig +``` + +```bash +$ talosctl gen config talos-k8s-vmware-tutorial https://:6443 +created controlplane.yaml +created join.yaml +created talosconfig +``` + +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 cloud +controlplane.yaml is valid for cloud mode +$ talosctl validate --config join.yaml --mode cloud +join.yaml is valid for cloud mode +``` + +### Set Environment Variables + +`govc` makes use of the following environment variables + +```bash +export GOVC_URL= +export GOVC_USERNAME= +export GOVC_PASSWORD= +``` + +> Note: If your vCenter installation makes use of self signed certificates, you'll want to export `GOVC_INSECURE=true`. + +There are some additional variables that you may need to set: + +```bash +export GOVC_DATACENTER= +export GOVC_RESOURCE_POOL= +export GOVC_DATASTORE= +export GOVC_NETWORK= +``` + +### Download the OVA + +A `talos.ova` asset is published with each [release](https://github.com/talos-systems/talos/releases). +We will refer to the version of the release as `$TALOS_VERSION` below. +It can be easily exported with `export TALOS_VERSION="v0.3.0-alpha.10"` or similar. + +```bash +curl -LO https://github.com/talos-systems/talos/releases/download/$TALOS_VERSION/talos.ova +``` + +### Import the OVA into vCenter + +We'll need to repeat this step for each Talos node we want to create. +In a typical HA setup, we'll have 3 control plane nodes and N workers. +In the following example, we'll setup a HA control plane with two worker nodes. + +```bash +govc import.ova -name talos-$TALOS_VERSION /path/to/downloaded/talos.ova +``` + +#### Create the Bootstrap Node + +We'll clone the OVA to create the bootstrap node (our first control plane node). + +```bash +govc vm.clone -on=false -vm talos-$TALOS_VERSION control-plane-1 +``` + +Talos makes use of the `guestinfo` facility of VMware to provide the machine/cluster configuration. +This can be set using the `govc vm.change` command. +To facilitate persistent storage using the vSphere cloud provider integration with Kubernetes, `disk.enableUUID=1` is used. + +```bash +govc vm.change \ + -e "guestinfo.talos.config=$(cat controlplane.yaml | base64)" \ + -e "disk.enableUUID=1" \ + -vm /ha-datacenter/vm/control-plane-1 +``` + +#### Update Hardware Resources for the Bootstrap Node + +- `-c` is used to configure the number of cpus +- `-m` is used to configure the amount of memory (in MB) + +```bash +govc vm.change \ + -c 2 \ + -m 4096 \ + -vm /ha-datacenter/vm/control-plane-1 +``` + +The following can be used to adjust the ephemeral disk size. + +```bash +govc vm.disk.change -vm control-plane-1 -disk.name disk-1000-0 -size 10G +``` + +```bash +govc vm.power -on control-plane-1 +``` + +#### Create the Remaining Control Plane Nodes + +```bash +govc vm.clone -on=false -vm talos-$TALOS_VERSION control-plane-2 +govc vm.change \ + -e "guestinfo.talos.config=$(base64 controlplane.yaml)" \ + -e "disk.enableUUID=1" \ + -vm /ha-datacenter/vm/control-plane-2 +govc vm.clone -on=false -vm talos-$TALOS_VERSION control-plane-3 +govc vm.change \ + -e "guestinfo.talos.config=$(base64 controlplane.yaml)" \ + -e "disk.enableUUID=1" \ + -vm /ha-datacenter/vm/control-plane-3 +``` + +```bash +govc vm.change \ + -c 2 \ + -m 4096 \ + -vm /ha-datacenter/vm/control-plane-2 +govc vm.change \ + -c 2 \ + -m 4096 \ + -vm /ha-datacenter/vm/control-plane-3 +``` + +```bash +govc vm.disk.change -vm control-plane-2 -disk.name disk-1000-0 -size 10G +govc vm.disk.change -vm control-plane-3 -disk.name disk-1000-0 -size 10G +``` + +```bash +govc vm.power -on control-plane-2 +govc vm.power -on control-plane-3 +``` + +#### Update Settings for the Worker Nodes + +```bash +govc vm.clone -on=false -vm talos-$TALOS_VERSION worker-1 +govc vm.change \ + -e "guestinfo.talos.config=$(base64 join.yaml)" \ + -e "disk.enableUUID=1" \ + -vm /ha-datacenter/vm/worker-1 +govc vm.clone -on=false -vm talos-$TALOS_VERSION worker-2 +govc vm.change \ + -e "guestinfo.talos.config=$(base64 join.yaml)" \ + -e "disk.enableUUID=1" \ + -vm /ha-datacenter/vm/worker-2 +``` + +```bash +govc vm.change \ + -c 4 \ + -m 8192 \ + -vm /ha-datacenter/vm/worker-1 +govc vm.change \ + -c 4 \ + -m 8192 \ + -vm /ha-datacenter/vm/worker-2 +``` + +```bash +govc vm.disk.change -vm worker-1 -disk.name disk-1000-0 -size 50G +govc vm.disk.change -vm worker-2 -disk.name disk-1000-0 -size 50G +``` + +```bash +govc vm.power -on worker-1 +govc vm.power -on worker-2 +``` + +### Retrieve the `kubeconfig` + +At this point we can retrieve the admin `kubeconfig` by running: + +```bash +talosctl --talosconfig talosconfig config endpoint +talosctl --talosconfig talosconfig config node +talosctl --talosconfig talosconfig kubeconfig . +``` diff --git a/website/content/docs/v0.12/Virtualized Platforms/xen.md b/website/content/docs/v0.12/Virtualized Platforms/xen.md new file mode 100644 index 0000000000..5a058501d1 --- /dev/null +++ b/website/content/docs/v0.12/Virtualized Platforms/xen.md @@ -0,0 +1,5 @@ +--- +title: "Xen" +--- + +Talos is known to work on Xen; however, it is currently undocumented. diff --git a/website/content/docs/v0.12/index.md b/website/content/docs/v0.12/index.md new file mode 100644 index 0000000000..f256307479 --- /dev/null +++ b/website/content/docs/v0.12/index.md @@ -0,0 +1,37 @@ +--- +title: Welcome +--- + +## Open Source + +### Community + +- GitHub: [repo](https://github.com/talos-systems/talos) +- Slack: Join our [slack channel](https://slack.dev.talos-systems.io) +- Matrix: Join our Matrix channels: + - Community: [#talos:matrix.org](https://matrix.to/#/#talos:matrix.org) + - Support: [#talos-support:matrix.org](https://matrix.to/#/#talos-support:matrix.org) +- Support: Questions, bugs, feature requests [GitHub Discussions](https://github.com/talos-systems/talos/discussions) +- Forum: [community](https://groups.google.com/a/talos-systems.com/forum/#!forum/community) +- Twitter: [@talossystems](https://twitter.com/talossystems) +- Email: [info@talos-systems.com](mailto:info@talos-systems.com) + +If you're interested in this project and would like to help in engineering efforts, or have general usage questions, we are happy to have you! +We hold a weekly meeting that all audiences are welcome to attend. + +We would appreciate your feedback so that we can make Talos even better! +To do so, you can take our [survey](https://docs.google.com/forms/d/1TUna5YTYGCKot68Y9YN_CLobY6z9JzLVCq1G7DoyNjA/edit). + +### Office Hours + +- When: Mondays at 16:30 UTC. +- Where: [Google Meet](https://meet.google.com/day-pxhv-zky). + +You can subscribe to this meeting by joining the community forum above. + +## Enterprise + +If you are using Talos in a production setting, and need consulting services to get started or to integrate Talos into your existing environment, we can help. +Talos Systems, Inc. offers support contracts with SLA (Service Level Agreement)-bound terms for mission-critical environments. + +[Learn More](https://www.talos-systems.com/support/) diff --git a/website/gridsome.config.js b/website/gridsome.config.js index e0f7f15fb6..3ebe1c8dcb 100644 --- a/website/gridsome.config.js +++ b/website/gridsome.config.js @@ -21,6 +21,12 @@ module.exports = { links: [{ path: "", title: "Docs" }], }, dropdownOptions: [ + { + version: "v0.12", + url: "/docs/v0.12/", + latest: false, + prerelease: true, + }, { version: "v0.11", url: "/docs/v0.11/", @@ -141,6 +147,17 @@ module.exports = { { title: "Reference", method: "alphabetical" }, { title: "Learn More", method: "weighted" }, ], + "v0.12": [ + { title: "Introduction", method: "weighted" }, + { title: "Bare Metal Platforms", method: "alphabetical" }, + { title: "Virtualized Platforms", method: "alphabetical" }, + { title: "Cloud Platforms", method: "alphabetical" }, + { title: "Local Platforms", method: "alphabetical" }, + { title: "Single Board Computers", method: "alphabetical" }, + { title: "Guides", method: "alphabetical" }, + { title: "Reference", method: "alphabetical" }, + { title: "Learn More", method: "weighted" }, + ], }, remark: { externalLinksTarget: "_blank", diff --git a/website/src/pages/Index.vue b/website/src/pages/Index.vue index 89604e33ea..e83e75562d 100644 --- a/website/src/pages/Index.vue +++ b/website/src/pages/Index.vue @@ -27,7 +27,7 @@ laptop inside Docker.

diff --git a/website/static/_redirects b/website/static/_redirects index 0afa663077..a993a54def 100644 --- a/website/static/_redirects +++ b/website/static/_redirects @@ -1,6 +1,7 @@ -# Redirects from what the browser requests to what we serve. -# +/docs/latest/* /docs/v0.10/:splat 302 + # The Netlify documentation says that the following redirect rules are -# equivalent, but that is not what is observed in practice. -/docs/latest /docs/v0.10 -/docs/latest/ /docs/v0.10 +# equivalent: https://docs.netlify.com/routing/redirects/redirect-options/#trailing-slash +# But that is not what is observed in practice. +/docs/latest /docs/v0.10/ 302 +/docs/latest/ /docs/v0.10/ 302