Update the Deployment Parameters
Update
the deployment parameters in
vars.yml
file inside the Deployment
Container by editing /root/k8s-installer/scripts/ansible/vars.yml
file
by referring the vars.yaml
configuration in the initial configuration that
is available in the base deployment.- The following are only examples. So you must set these values according to your environment.
- You must save and secure thevars.ymlfile. We strongly recommend using a version control system such as git to keep track of your changes and for backup.
- Configure the general parameters.Set the values according to your environment.cluster_name: <your-cluster-name> # Unique name for your cluster ansible_user: <your-SSH-username> # SSH username for the VMs ansible_become_password: <your-password> # SSH password for the VMsUpdate the parameteradmin_public_keys_pathwith the path of public key generated during SSH key generation.admin_public_keys_path: /root/.ssh/id_rsa.pub # Path to the SSH public key. This will be a .pub file under $HOME/.ssh/Update thecontrol_plane_ipsandworker_node_ipsas specified in the following format.You must maintain the same order for control_plane_ips and worker_node_ips from the previous Kubernetes Cluster (CaaS) deployment.control_plane_ips: # The list of control plane IP addresses of your VMs.This should be a YAML list. - <IP1> - <IP2> worker_node_ips: # The list of worker nodes IP addresses of your VMs.This should be a YAML list. - <IP3> - <IP4>
- Update the Deployment Host IP and the YUM server details.## Deployment host IP address ## Make sure firewall is disabled in deployment host # The IP address of your deployment host deployment_host_ip:<your-deployment-host-ip> ## default value is http. Use https for secure communication. yum_protocol: http # The IP address/hostname of your yum/package repository yum_server: <your-yum-server-ip>
- For Harbor Container Registry, uncomment and update theharbor_registry_ipparameter with the selected static IP address.### Harbor parameters ### ## The static IP address to be used for Harbor Container Registry ## This IP address must be in the same subnet as the VM IPs. harbor_registry_ip: <static-IPAddress>
- Set the following parameterstorage_dirto a location that has been previously set as part of previous Kubernetes Cluster (CaaS) deployment.Ensure that in the below example, the/mntfile system must have 600 GB for Local PV and 250 GB for VMware vSAN or Block Storage based Deployment and 744 permission.For example:storage_dir: /mnt
- Uncomment below kubelet directory only during Kubernetes Cluster (CaaS) upgrade coming from 2.3.0 as shown in below example path. For Example : .#kubelet_storage_dir: /var/lib/kubeletDo not modify the path ofkubelet_storage_dir.
- For storage related parameters, uncomment and set the following parameters to true.### Storage related parameters ### use_external_storage: true install_vsphere_csi: true
- If usingVMware vSANor Block Storage, uncomment and update the following VMware vCenter parameters.If you do not want to provide theVMware vCenterpassword in the plain text format, you can comment the#vcenter_password:. During the Kubernetes cluster creation,VMware vCenterpassword will be prompted.### vCenter parameters for using vSAN storage or Block Storage ### vcenter_ip: <your-vCenter-IP> vcenter_name: <your-vCenter-name> vcenter_username: <your-vCenter-username> vcenter_password: <your-vCenter-password> ## List of data centers that are part of your vSAN cluster vcenter_data_centers: - <your-datacenter> vcenter_insecure: true # True, if using self signed certificates ## The datastore URL. To locate, go to your vCenter -> datastores -> your vSAN datastore or Block Storage -> Summary -> URL datastore_url: <your-datastore-url>This is a sample snippet of thevars.yamlfile:### General parameters ### cluster_name: vmbased-upgrade-prod-vsan ansible_user: root ansible_become_password: dangerous admin_public_keys_path: /root/.ssh/id_rsa.pub control_plane_ips: - 10.220.143.240 - 10.220.143.248 - 10.220.143.221 worker_node_ips: - 10.220.143.163 - 10.220.143.245 - 10.220.143.182 - 10.220.143.113 - 10.220.143.37 - 10.220.143.203 - 10.220.143.108 - 10.220.143.132 - 10.220.143.56 ## Deployment host IP address ## Make sure firewall is disabled in deployment host deployment_host_ip: 10.1.1.1 ## default value is http. Use https for secure communication. yum_protocol: http ## IP address/hostname of yum/package repo yum_server: 10.198.x.x ### Harbor parameters ### ## (Optional) The IP address to be used for the Harbor container registry, if static IPs are available. ## This IP address must be in the same subnet as the VM IPs. harbor_registry_ip: 10.1.1.2 ## When using local storage (Direct Attached Storage), set this to a location that has sufficient storage space for storing all application data #In case of upgrade, retain the same storage directory as used in previous Kubernetes Cluster (CaaS) deployment. storage_dir: /mnt #UnComment the below storage directory during upgrade only if you are coming from 2.3.0 to later versions. kubelet_storage_dir: /var/lib/kubelet ### Storage related parameters ### use_external_storage: true install_vsphere_csi: true ### vCenter parameters for using external storage (VMFS or vSAN datastores or Block Storage) ### vcenter_ip: 10.x.x.x vcenter_name: vcenter01.vmware.com vcenter_username: [email protected] vcenter_password: xxxxxxxxx ## List of data centers that are part of your cluster vcenter_data_centers: - testdatacenter vcenter_insecure: true ## The datastore URL. To locate, go to your vCenter -> datastores -> your datastore -> Summary -> URL ## Note: All VMs must be on the same datastore! datastore_url: ds:///vmfs/volumes/vsan:527e4e6193eacd65-602e106ffe383d68/
- Ensure that theVMware vSANor Block Storage has minimum of 1.5 TB of storage space.
- vcenter_ip:IP address or the FQDN of the vCenter.
- vcenter_name:Name of the vCenter as shown in the vSphere Console (after logging in to the vCenter using vSphere Console)