glholland / homelab

2 stars 0 forks source link

Deployment script using PVE API #5

Open glholland opened 7 months ago

glholland commented 7 months ago

Update deploy OKD script to deploy from local machine using the PVE API instead of running from host

or ya know, TF 🤷 https://github.com/Telmate/terraform-provider-proxmox/blob/master/docs/index.md

glholland commented 7 months ago

https://pve.proxmox.com/wiki/Proxmox_VE_API

glholland commented 7 months ago

Get token

curl --silent --insecure --data "username=root@pam&password=yourpassword" \
 https://$APINODE:8006/api2/json/access/ticket\
| jq --raw-output '.data.ticket' | sed 's/^/PVEAuthCookie=/' > cookie

Test saved token


curl  --insecure --cookie "$(<cookie)" https://10.0.0.100:8006/api2/json/nodes/$TARGETNODE/status | jq '.'