Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install-proxmox-kubernetes/ #1

Open
utterances-bot opened this issue Sep 27, 2023 · 18 comments
Open

install-proxmox-kubernetes/ #1

utterances-bot opened this issue Sep 27, 2023 · 18 comments

Comments

@utterances-bot
Copy link

Creating a Kubernetes cluster on Proxmox VE with Terraform & Kubespray

I'll show you how to create your own home-lab Kubernetes cluster on Proxmox using Terraform and Kubespray.

https://www.khanhph.com/install-proxmox-kubernetes/

Copy link

Hello @khanh-ph
Everything is OK after the terraform plan. When I run terraform apply, it returns this error:

Error: 400 Parameter verification failed. │ │ with module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[2], │ on modules/proxmox_ubuntu_vm/main.tf line 12, in resource "proxmox_vm_qemu" "ubuntu_vm": │ 12: resource "proxmox_vm_qemu" "ubuntu_vm" {

Line 12 of main.tf is:

resource "proxmox_vm_qemu" "ubuntu_vm" {

What could be happening?
What do you suggest to correct this error?
Thank you for your blog. Congratulations.

Copy link
Owner

Hi Claiton Campos,
Would you mind sharing your plan output?

Copy link

Hello @khanh-ph
I wanted to complement my previous comment to emphasize that you are to be congratulated for the so smooth and optimistic way that describes your DevOps engineer experiences. It's something unusual in this area. Congratulations
All the best and even greater success in your career.
Merry Christmas 🎄

Copy link
Owner

The '400 Parameter verification failed' issue, originally caused by pm_host being specified as an IP address, has been addressed by fixing the value to a hostname. See khanh-ph/proxmox-kubernetes#91

@khanh-ph
Copy link
Owner

khanh-ph commented Feb 6, 2024

@jonasbenavides82 It can be accomplished using a reverse proxy. In my lab environment, I've installed an Nginx Proxy Manager LXC and connected it to both networks.

Copy link

ivziete commented Feb 18, 2024

Hello i have the problem, did you ever see him?

│ Error: Plugin did not respond

│ with module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[1],
│ on modules/proxmox_ubuntu_vm/main.tf line 12, in resource "proxmox_vm_qemu" "ubuntu_vm":
│ 12: resource "proxmox_vm_qemu" "ubuntu_vm" {

│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.

Stack trace from the terraform-provider-proxmox_v2.9.14 plugin:

panic: interface conversion: interface {} is string, not float64

Thank you for your blog. Congratulations.

Copy link

knag08 commented Feb 18, 2024

Executing -> terraform plan -var-file="example.tfvars".

gets me the below output

var.vm_os_disk_storage
Default storage pool where OS VM disk is placed

Enter a value: ----> ????

Planning failed. Terraform encountered an error while generating this plan.

│ Error: user terraform-prov@pve has valid credentials but cannot retrieve user list, check privilege separation of api token

│ with provider["registry.terraform.io/telmate/proxmox"],
│ on providers.tf line 16, in provider "proxmox":
│ 16: provider "proxmox" {

Copy link

knag08 commented Feb 18, 2024

Possible Dumb questions

  1. ar.vm_os_disk_storage
    Default storage pool where OS VM disk is placed

Enter a value: What should be the value ? And what is the default value that it will take

  1. Am I supposed to base64 encode these Keys ? ~/proxmox-kubernetes/ssh-keys/id_rsa.pub and id_rsa ?

Copy link

knag08 commented Feb 18, 2024

Says Creating for a long time.. No nodes shows Up ?!

After fixing with assumptions - ar.vm_os_disk_storage = local-lvm (which exists for) and 2. using those base64 encoded pub and private keys.

The below verbose happens for a long time without actually creating VMs/Nodes and switch any tab on Proxmox will terminate/close this connection and the task!

module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[1]: Still creating...

@khanh-ph
Copy link
Owner

Hello i have the problem, did you ever see him?

│ Error: Plugin did not respond │ │ with module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[1], │ on modules/proxmox_ubuntu_vm/main.tf line 12, in resource "proxmox_vm_qemu" "ubuntu_vm": │ 12: resource "proxmox_vm_qemu" "ubuntu_vm" { │ │ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details. ╵

Stack trace from the terraform-provider-proxmox_v2.9.14 plugin:

panic: interface conversion: interface {} is string, not float64

Thank you for your blog. Congratulations.

Hello @ivziete,
If you are using Proxmox VE >= 8.1, please note that my project doesn't yet support it.

@khanh-ph
Copy link
Owner

Says Creating for a long time.. No nodes shows Up ?!

After fixing with assumptions - ar.vm_os_disk_storage = local-lvm (which exists for) and 2. using those base64 encoded pub and private keys.

The below verbose happens for a long time without actually creating VMs/Nodes and switch any tab on Proxmox will terminate/close this connection and the task!

module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[1]: Still creating...

Hi @knag08,
May I ask for your Proxmox VE and Terraform version? Also, it would be helpful to know the actual values of all your variables. Could you email me your example.tfvars file?

Copy link

oreze commented Jul 10, 2024

Hi! I've upgraded your repo and added support to proxmox 8.x, fixed a few issues by the way. If someone want to take a look check this PR, feel free to use it. If something's wrong, just contact me on Github.

khanh-ph/proxmox-kubernetes#94
khanh-ph/proxmox-scripts#13

Copy link

@oreze This PR helped me out quite a bit.

@khanh-ph
Copy link
Owner

@oreze I haven't had time to work on this yet. Thank you for your contribution. I will look into it and update my repo as soon as I can.

@khanh-ph
Copy link
Owner

Proxmox VE 8.2 is now supported. Thanks to @oreze for the contributions.

Copy link

I got this error:

Planning failed. Terraform encountered an error while generating this plan.


│ Error: tag validation failed: tag may only include the following characters: abcdefghijklmnopqrstuvwxyz0123456789_

│ with module.kubespray_host.proxmox_vm_qemu.ubuntu_vm[0],
│ on modules/proxmox_ubuntu_vm/main.tf line 32, in resource "proxmox_vm_qemu" "ubuntu_vm":
│ 32: tags = var.vm_tags

Copy link

ubuntu@bastion:~/proxmox-kubernetes$ git branch

  • (HEAD detached at 5.0.0)
    develop

Copy link

commented the vm_tags, now another error:

module.k8s_control_plane_nodes.proxmox_vm_qemu.ubuntu_vm[0]: Creating...
module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[1]: Creating...
module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[0]: Creating...
module.kubespray_host.proxmox_vm_qemu.ubuntu_vm[0]: Creating...
module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[2]: Creating...
module.k8s_control_plane_nodes.proxmox_vm_qemu.ubuntu_vm[0]: Still creating... [10s elapsed]
module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[1]: Still creating... [10s elapsed]
module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[0]: Still creating... [10s elapsed]
module.kubespray_host.proxmox_vm_qemu.ubuntu_vm[0]: Still creating... [10s elapsed]
module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[2]: Still creating... [10s elapsed]
module.k8s_control_plane_nodes.proxmox_vm_qemu.ubuntu_vm[0]: Still creating... [20s elapsed]
module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[1]: Still creating... [20s elapsed]
module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[0]: Still creating... [20s elapsed]
module.kubespray_host.proxmox_vm_qemu.ubuntu_vm[0]: Still creating... [20s elapsed]
module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[2]: Still creating... [20s elapsed]
module.k8s_control_plane_nodes.proxmox_vm_qemu.ubuntu_vm[0]: Still creating... [30s elapsed]
module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[1]: Still creating... [30s elapsed]
module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[0]: Still creating... [30s elapsed]
module.kubespray_host.proxmox_vm_qemu.ubuntu_vm[0]: Still creating... [30s elapsed]
module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[2]: Still creating... [30s elapsed]
module.k8s_control_plane_nodes.proxmox_vm_qemu.ubuntu_vm[0]: Creation complete after 40s [id=valero/qemu/3001]
module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[1]: Still creating... [40s elapsed]
module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[0]: Still creating... [40s elapsed]
module.kubespray_host.proxmox_vm_qemu.ubuntu_vm[0]: Still creating... [40s elapsed]
module.k8s_worker_nodes.proxmox_vm_qemu.ubuntu_vm[1]: Creation complete after 41s [id=valero/qemu/3003]

│ Error: 500 Internal Server Error

│ with module.kubespray_host.proxmox_vm_qemu.ubuntu_vm[0],
│ on modules/proxmox_ubuntu_vm/main.tf line 12, in resource "proxmox_vm_qemu" "ubuntu_vm":
│ 12: resource "proxmox_vm_qemu" "ubuntu_vm" {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants