2.5 KiB
P5x api-server
P5x is a set of tools for running a Kubernetes cluster on LXC containers in Proxmox. The api-server
is the central component of the P5x system that handles interactions between Kubernetes and the underlying Proxmox infrastructure.
The api-server
is a necessary component to run any part of the P5x system.
Deployment
P5x Storage Setup
P5x requires a small amount of persistent storage for its system database. This is accomplished with a local path on a Kubernetes node.
- Pick an LXC container in your K8s cluster that the P5x API server will run on.
- Create a new disk in Proxmox (may not be NFS storage) and mount it at
/mnt/p5x-system-data
on the LXC container. - Update
deploy/20-volume.yaml
and replace thecontrol.k8s
hostname in thenodeSelectorTerms
with the hostname of your K8s LXC container.
Deploy API Server to Kubernetes
Create a file with the necessary environment variables:
# 10-environment.yaml
---
apiVersion: v1
kind: Secret
metadata:
name: api-env
namespace: p5x-system
type: Opaque
stringData:
P5X_API_HOST: "" # fully-qualified hostname or IP address of your Proxmox VE server
P5X_API_ROOT_PASSWORD: ""
P5X_STORAGE_POOL: "" # name of your Proxmox VE storage pool -- MUST be network storage shared between nodes
P5X_STORAGE_DRIVER: "lvm" # what type of driver the storage pool uses ('lvm' or 'nfs')
P5X_K8S_ROOT_PASSWORD: "" # FOR FUTURE USE - you can just fill in a random string here for now
Apply the environment secret and create the rest of the P5x API resources:
kubectl apply -f deploy/0-namespace.yaml -f 10-environment.yaml -f deploy
In your Kubernetes cluster, in the p5x-system
namespace, you should now see a p5x-api-server-0
pod successfully boot.
License
P5x: Proxmox on Kubernetes - API Server Copyright (C) 2025 Garrett Mills shout@garrettmills.dev
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.