mirror of
https://github.com/outbackdingo/proxmox-cloud-controller-manager.git
synced 2026-01-27 10:20:13 +00:00
docs: install instruction
Move the copy/paste instructions to a separate document Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
This commit is contained in:
143
docs/install.md
Normal file
143
docs/install.md
Normal file
@@ -0,0 +1,143 @@
|
||||
# Install
|
||||
|
||||
Proxmox Cloud Controller Manager (CCM) supports controllers:
|
||||
* cloud-node
|
||||
* cloud-node-lifecycle
|
||||
|
||||
`cloud-node` - detects new node launched in the cluster and registers them in the cluster.
|
||||
Assigns labels and taints based on Proxmox VM configuration.
|
||||
|
||||
`cloud-node-lifecycle` - detects node deletion on Proxmox side and removes them from the cluster.
|
||||
|
||||
## Create a Proxmox token
|
||||
|
||||
Official [documentation](https://pve.proxmox.com/wiki/User_Management)
|
||||
|
||||
```shell
|
||||
# Create role CCM
|
||||
pveum role add CCM -privs "VM.Audit"
|
||||
# Create user and grant permissions
|
||||
pveum user add kubernetes@pve
|
||||
pveum aclmod / -user kubernetes@pve -role CCM
|
||||
pveum user token add kubernetes@pve ccm -privsep 0
|
||||
```
|
||||
|
||||
## Deploy CCM
|
||||
|
||||
Create the proxmox credentials config file:
|
||||
|
||||
```yaml
|
||||
clusters:
|
||||
# List of Proxmox clusters, region mast be unique
|
||||
- url: https://cluster-api-1.exmple.com:8006/api2/json
|
||||
insecure: false
|
||||
token_id: "kubernetes@pve!ccm"
|
||||
# Token from the previous step
|
||||
token_secret: "secret"
|
||||
# Region name, can be any string, it will use as for kubernetes topology.kubernetes.io/region label
|
||||
region: cluster-1
|
||||
```
|
||||
|
||||
### Method 1: kubectl
|
||||
|
||||
Upload it to the kubernetes:
|
||||
|
||||
```shell
|
||||
kubectl -n kube-system create secret generic proxmox-cloud-controller-manager --from-file=config.yaml
|
||||
```
|
||||
|
||||
Deploy Proxmox CCM with `cloud-node,cloud-node-lifecycle` controllers
|
||||
|
||||
```shell
|
||||
kubectl apply -f https://raw.githubusercontent.com/sergelogvinov/proxmox-cloud-controller-manager/main/docs/deploy/cloud-controller-manager.yml
|
||||
```
|
||||
|
||||
Deploy Proxmox CCM with `cloud-node-lifecycle` controller (for Talos)
|
||||
|
||||
```shell
|
||||
kubectl apply -f https://raw.githubusercontent.com/sergelogvinov/proxmox-cloud-controller-manager/main/docs/deploy/cloud-controller-manager-talos.yml
|
||||
```
|
||||
|
||||
### Method 2: helm chart
|
||||
|
||||
Create the config file
|
||||
|
||||
```yaml
|
||||
# proxmox-ccm.yaml
|
||||
config:
|
||||
clusters:
|
||||
- url: https://cluster-api-1.exmple.com:8006/api2/json
|
||||
insecure: false
|
||||
token_id: "kubernetes@pve!ccm"
|
||||
token_secret: "secret"
|
||||
region: cluster-1
|
||||
```
|
||||
|
||||
Deploy Proxmox CCM (deployment mode)
|
||||
|
||||
```shell
|
||||
helm upgrade -i --namespace=kube-system -f proxmox-ccm.yaml \
|
||||
proxmox-cloud-controller-manager \
|
||||
oci://ghcr.io/sergelogvinov/charts/proxmox-cloud-controller-manager
|
||||
```
|
||||
|
||||
Deploy Proxmox CCM (daemonset mode)
|
||||
|
||||
It makes sense to deploy on all control-plane nodes. Do not forget to set the nodeSelector.
|
||||
|
||||
```shell
|
||||
helm upgrade -i --namespace=kube-system -f proxmox-ccm.yaml \
|
||||
--set useDaemonSet=true \
|
||||
proxmox-cloud-controller-manager \
|
||||
oci://ghcr.io/sergelogvinov/charts/proxmox-cloud-controller-manager
|
||||
```
|
||||
|
||||
More options you can find [here](charts/proxmox-cloud-controller-manager)
|
||||
|
||||
## Deploy CCM (Rancher)
|
||||
|
||||
Official [documentation](https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/node-requirements-for-rancher-managed-clusters)
|
||||
|
||||
Rancher RKE2 configuration:
|
||||
|
||||
```yaml
|
||||
machineGlobalConfig:
|
||||
# Kubelet predefined value --cloud-provider=external
|
||||
cloud-provider-name: external
|
||||
# Disable Rancher CCM
|
||||
disable-cloud-controller: true
|
||||
```
|
||||
|
||||
Create the helm values file:
|
||||
|
||||
```yaml
|
||||
# proxmox-ccm.yaml
|
||||
config:
|
||||
clusters:
|
||||
- url: https://cluster-api-1.exmple.com:8006/api2/json
|
||||
insecure: false
|
||||
token_id: "kubernetes@pve!ccm"
|
||||
token_secret: "secret"
|
||||
region: cluster-1
|
||||
|
||||
# Use host resolv.conf to resolve proxmox connection url
|
||||
useDaemonSet: true
|
||||
|
||||
# Set nodeSelector in daemonset mode is required
|
||||
nodeSelector:
|
||||
node-role.kubernetes.io/control-plane: ""
|
||||
```
|
||||
|
||||
Deploy Proxmox CCM (daemondset mode)
|
||||
|
||||
```shell
|
||||
helm upgrade -i --namespace=kube-system -f proxmox-ccm.yaml \
|
||||
proxmox-cloud-controller-manager \
|
||||
oci://ghcr.io/sergelogvinov/charts/proxmox-cloud-controller-manager
|
||||
```
|
||||
|
||||
## Deploy CCM with load balancer (optional)
|
||||
|
||||
This optional setup to improve the Proxmox API availability.
|
||||
|
||||
See [load balancer](loadbalancer.md) for installation instructions.
|
||||
@@ -41,10 +41,10 @@ kubectl apply -f proxmox-service.yaml
|
||||
|
||||
Second, we need to deploy proxmox CCM with sidecar load balancer.
|
||||
Haproxy will resolve the `proxmox.kube-system.svc.cluster.local` service and uses IPs from the endpoints to distribute traffic.
|
||||
Proxmox CCM will use the `proxmox.domain.com` domain to connect to the proxmox cluster wich is resolved to the load balancer IP (127.0.0.1).
|
||||
Proxmox CCM will use the `proxmox.domain.com` domain to connect to the proxmox cluster which is resolved to the load balancer IP (127.0.0.1).
|
||||
|
||||
```yaml
|
||||
# Helm Chart values
|
||||
# CCM helm chart values
|
||||
|
||||
config:
|
||||
clusters:
|
||||
|
||||
Reference in New Issue
Block a user