From afe2c2ffa08e263cbb7dba366d6348ae4a9dc801 Mon Sep 17 00:00:00 2001 From: alperencelik Date: Fri, 17 Nov 2023 01:38:03 +0300 Subject: [PATCH] Update README.md --- README.md | 35 ++++++++++++++++++++++++++- charts/kubemox/samples/container.yaml | 19 +++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 charts/kubemox/samples/container.yaml diff --git a/README.md b/README.md index 6b27052..f4cf8b2 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ helm install kubemox ./ -f values.yaml -n $NAMESPACE Currently Kubemox brings five different CRDs for only VirtualMachines in Proxmox. These are `VirtualMachine`, `VirtualMachineSet`, `ManagedVirtualMachine`, `VirtualMachineSnapshot` and `VirtualMachineSnapshotPolicy`. You can use these CRDs to create and manage VirtualMachine(s) in Proxmox. +### VirtualMachine + `VirtualMachine` is a way to create new VirtualMachines in Proxmox via operator. You can create `VirtualMachine` resource and Kubemox will create it for you in Proxmox. `VirtualMachine` is also reconciled by the operator which means every change on `VirtualMachine` resource will be reflected to Proxmox as well. `VirtualMachineSet` is a way to create multiple VirtualMachines in Proxmox. The relationship between `VirtualMachineSet` and `VirtualMachine` is similar to the relationship between `Deployment` and `Pod`. `VirtualMachineSet` creates multiple `VirtualMachine` resources and Kubemox will create them for you in Proxmox. You can only use `VirtualMachineSet` with templates. Creating multiple VirtualMachines from scratch is not supported yet. @@ -40,6 +42,11 @@ Currently Kubemox brings five different CRDs for only VirtualMachines in Proxmox `VirtualMachineSnapshot` is helping to create snapshots for `VirtualMachine` object. This object mostly considered for the milestone snapshots. This will create only one snapshot for the `VirtualMachine` object. Also deleting the `VirtualMachineSnapshot` object won't be deleting the snapshot from Proxmox since the current proxmox client the project uses doesn't have an implementation for deleting snapshots. `VirtualMachineSnapshotPolicy` is helping to create snapshots for `VirtualMachine` object periodically. This object mostly considered for the scheduled snapshots. The schedule and the selectors that you specify matches with the `VirtualMachine` objects and according to the schedule it will create snapshots for those `VirtualMachine` objects. `VirtualMachineSnapshotPolicy` will be spawning `VirtualMachineSnapshot` objects for each `VirtualMachine` object that matches with the selectors. Also deleting the `VirtualMachineSnapshotPolicy` object also won't be deleting the snapshots from Proxmox but it will stop creating new `VirtualMachineSnapshot` objects for the `VirtualMachine` objects that matches with the selectors. + +### Containers + +`Container` is a way to create new Linux containers (LXC) in Proxmox via operator. You can create `Container` resource and Kubemox will create it for you in Proxmox. `Container` is also reconciled by the operator which means every change on `Container` resource will be reflected to Proxmox as well. `Container` object should be generated by other container template objects. This is a requirement that comes from Proxmox itself. + ### Create a VirtualMachine To create a VirtualMachine you can use the following `VirtualMachine` resource: @@ -123,7 +130,33 @@ spec: my-label: my-virtualmachine ``` -To learn more about `VirtualMachine`, `VirtualMachineSet` and `VirtualMachineSnapshot` resources you can check `charts/kubemox/samples/` +### Create a Container + +To create a Container you can use the following `Container` resource: + +```yaml +apiVersion: proxmox.alperen.cloud/v1alpha1 +kind: Container +metadata: + name: container-new +spec: + name: container-new + nodeName: lowtower + template: + # This template should be generated by other container template object + name: test-container + cores: 2 + memory: 4096 # As MB + disk: + - storage: nvme + size: 50 # As GB + type: scsi + network: + - model: virtio + bridge: vmbr0 +``` + +To learn more about `VirtualMachine`, `VirtualMachineSet`, `Container` and `VirtualMachineSnapshot` resources you can check `charts/kubemox/samples/` ## Developing diff --git a/charts/kubemox/samples/container.yaml b/charts/kubemox/samples/container.yaml new file mode 100644 index 0000000..9638801 --- /dev/null +++ b/charts/kubemox/samples/container.yaml @@ -0,0 +1,19 @@ +apiVersion: proxmox.alperen.cloud/v1alpha1 +kind: Container +metadata: + name: container-new +spec: + name: container-new + nodeName: lowtower + template: + # Name of the template to be cloned + name: test-container + cores: 2 + memory: 4096 # As MB + disk: + - storage: nvme + size: 50 # As GB + type: scsi + network: + - model: virtio + bridge: vmbr0 \ No newline at end of file