Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
alperencelik committed Nov 16, 2023
1 parent 8364824 commit afe2c2f
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
19 changes: 19 additions & 0 deletions charts/kubemox/samples/container.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit afe2c2f

Please sign in to comment.