mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-21 06:31:11 +02:00
In order to DRY up all installation methods and mount methods, this PR introduces a few more runtime modes. The modes are then used to determine the strategy for creating and or mounting the paritions. Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
77 lines
1.6 KiB
Markdown
77 lines
1.6 KiB
Markdown
---
|
|
title: "KVM"
|
|
date: 2018-10-29T19:40:55-07:00
|
|
draft: true
|
|
menu:
|
|
docs:
|
|
parent: 'guides'
|
|
---
|
|
|
|
## Creating a Master Node
|
|
|
|
On the KVM host, install a master node to an available block device:
|
|
|
|
```bash
|
|
docker run \
|
|
--rm \
|
|
--privileged \
|
|
--volume /dev:/dev \
|
|
talos-systems/talos:latest image -b /dev/sdb -f \
|
|
-p metal -u http://${IP}:8080/master.yaml
|
|
```
|
|
|
|
{{% note %}}`http://${IP}:8080/master.yaml` should be reachable by the VM and contain a valid master configuration file.{{% /note %}}
|
|
|
|
Now, create the VM:
|
|
|
|
```bash
|
|
virt-install \
|
|
-n master \
|
|
--description "Kubernetes master node." \
|
|
--os-type=Linux \
|
|
--os-variant=generic \
|
|
--virt-type=kvm \
|
|
--cpu=host \
|
|
--vcpus=2 \
|
|
--ram=4096 \
|
|
--disk path=/dev/sdb \
|
|
--network bridge=br0,model=e1000,mac=52:54:00:A8:4C:E1 \
|
|
--graphics none \
|
|
--boot hd \
|
|
--rng /dev/random
|
|
```
|
|
|
|
## Creating a Worker Node
|
|
|
|
On the KVM host, install a worker node to an available block device:
|
|
|
|
```bash
|
|
docker run \
|
|
--rm \
|
|
--privileged \
|
|
--volume /dev:/dev \
|
|
talos-systems/talos:latest image -b /dev/sdc -f \
|
|
-p metal -u http://${IP}:8080/worker.yaml
|
|
```
|
|
|
|
{{% note %}}`http://${IP}:8080/worker.yaml` should be reachable by the VM and contain a valid worker configuration file.{{% /note %}}
|
|
|
|
Now, create the VM:
|
|
|
|
```bash
|
|
virt-install \
|
|
-n master \
|
|
--description "Kubernetes worker node." \
|
|
--os-type=Linux \
|
|
--os-variant=generic \
|
|
--virt-type=kvm \
|
|
--cpu=host \
|
|
--vcpus=2 \
|
|
--ram=4096 \
|
|
--disk path=/dev/sdc \
|
|
--network bridge=br0,model=e1000,mac=52:54:00:B9:5D:F2 \
|
|
--graphics none \
|
|
--boot hd \
|
|
--rng /dev/random
|
|
```
|