Skip to content
Snippets Groups Projects
Select Git revision
  • e4d2b62bdb7d820859d624306e65f4547f06facd
  • master default protected
  • v1.14.7
  • v1.14.6
  • v1.14.5
  • v1.14.4
  • v1.14.3
  • v1.14.2
  • v1.14.1
  • v1.14.0
  • v1.13.2
  • v1.13.1
  • v1.13.0
  • v1.12.1
  • v1.12.0
  • v1.11.1
  • v1.11.0
  • v1.10.0
  • v1.9.2
  • v1.9.1
  • v1.9.0
  • v1.8.4
22 results

README-sudocmdgroup.md

Blame
  • vsphere.md 11.40 KiB

    vSphere

    Kubespray can be deployed with vSphere as Cloud provider. This feature supports:

    • Volumes
    • Persistent Volumes
    • Storage Classes and provisioning of volumes
    • vSphere Storage Policy Based Management for Containers orchestrated by Kubernetes

    Out-of-tree vSphere cloud provider

    Prerequisites

    You need at first to configure your vSphere environment by following the official documentation.

    After this step you should have:

    • vSphere upgraded to 6.7 U3 or later
    • VM hardware upgraded to version 15 or higher
    • UUID activated for each VM where Kubernetes will be deployed

    Kubespray configuration

    First in inventory/sample/group_vars/all/all.yml you must set the cloud provider to external and external_cloud_provider to external_cloud_provider.

    cloud_provider:  "external"
    external_cloud_provider: "vsphere"

    Then, inventory/sample/group_vars/all/vsphere.yml, you need to declare your vCenter credentials and enable the vSphere CSI following the description below.

    Variable Required Type Choices Default Comment
    external_vsphere_vcenter_ip TRUE string IP/URL of the vCenter
    external_vsphere_vcenter_port TRUE string "443" Port of the vCenter API
    external_vsphere_insecure TRUE string "true", "false" "true" set to "true" if the host above uses a self-signed cert
    external_vsphere_user TRUE string User name for vCenter with required privileges (Can also be specified with the VSPHERE_USER environment variable)
    external_vsphere_password TRUE string Password for vCenter (Can also be specified with the VSPHERE_PASSWORD environment variable)
    external_vsphere_datacenter TRUE string Datacenter name to use
    external_vsphere_kubernetes_cluster_id TRUE string "kubernetes-cluster-id" Kubernetes cluster ID to use
    vsphere_csi_enabled TRUE boolean false Enable vSphere CSI

    Example configuration:

    external_vsphere_vcenter_ip: "myvcenter.domain.com"
    external_vsphere_vcenter_port: "443"
    external_vsphere_insecure: "true"
    external_vsphere_user: "administrator@vsphere.local"
    external_vsphere_password: "K8s_admin"
    external_vsphere_datacenter: "DATACENTER_name"
    external_vsphere_kubernetes_cluster_id: "kubernetes-cluster-id"
    vsphere_csi_enabled: true

    For a more fine-grained CSI setup, refer to the vsphere-csi documentation.

    Deployment

    Once the configuration is set, you can execute the playbook again to apply the new configuration:

    cd kubespray
    ansible-playbook -i inventory/sample/hosts.ini -b -v cluster.yml

    You'll find some useful examples here to test your configuration.