-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the copy/paste instructions to a separate document Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
- Loading branch information
1 parent
5876cd4
commit 4d79e4e
Showing
3 changed files
with
164 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters