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

Deploy k8s-cluster without VMware compute cluster #25

Open
semaph0r opened this issue Dec 18, 2019 · 7 comments
Open

Deploy k8s-cluster without VMware compute cluster #25

semaph0r opened this issue Dec 18, 2019 · 7 comments

Comments

@semaph0r
Copy link

Is it possible to use this pipelines on VMware without the need of a compute cluster and all the vMotion stuff? I don't need that.

I've looked into vsphere-kubespray.tf and it seems that the compute cluster variable is only used to navigate through the VCenter ressource graph more efficiently.

@sguyennet
Copy link
Owner

Hi,
Do you mean deploying Kubernetes on standalone ESXi (without a vCenter)?

@Harsun
Copy link

Harsun commented Jan 8, 2020 via email

@semaph0r
Copy link
Author

semaph0r commented Jan 8, 2020

Hi,
Do you mean deploying Kubernetes on standalone ESXi (without a vCenter)?

No, I am using vCenter but did not licenzed vMotion, so compute clusters are not available. Actually I do not plan to use compute clusters either. My questions is, if there are any side effects by refactor the scripts not to use compute clusters.

The refactoring would remove all compute cluster resources and it's references from the terraform script and should tie all subsequent resources directly together.

As of now, the only places where the compute cluster is use are:

resource "vsphere_resource_pool" "resource_pool" {
  name                    = "${var.vsphere_resource_pool}"
  parent_resource_pool_id = "${data.vsphere_compute_cluster.cluster.resource_pool_id}"
}
# Create anti affinity rule for the Kubernetes master VMs #
resource "vsphere_compute_cluster_vm_anti_affinity_rule" "master_anti_affinity_rule" {
  count               = "${var.vsphere_enable_anti_affinity == "true" ? 1 : 0}"
  name                = "${var.vm_name_prefix}-master-anti-affinity-rule"
  compute_cluster_id  = "${data.vsphere_compute_cluster.cluster.id}"
  virtual_machine_ids = ["${vsphere_virtual_machine.master.*.id}"]

  depends_on = ["vsphere_virtual_machine.master"]
}

I'd remove these resources from the script. Also parent_resource_pool_id was probably declared obsolete, at least there is nothing in the documentation: https://www.terraform.io/docs/providers/vsphere/d/resource_pool.html. See #26

@Harsun
Copy link

Harsun commented Jan 8, 2020 via email

@cbg-teamomni
Copy link

I have a single ESXi server under a vCenter and would like to know if I can deploy without a cluster.

@semaph0r
Copy link
Author

I'll test in the next few days, if it is possible to refactor the scripts for deployment of the k8s-cluster without a dependency of a compute cluster in vCenter

@cbg-teamomni
Copy link

Thanks in advance. It would be handy especially for prototyping and demo purposes.

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

4 participants