Kubernetes Blueprint for vRealize Automation
This Blueprint was originally developed using vRealize Automation 7.4 and CentOS 7 and subsequently updated for vRA 7.5 and then in Aug of 2019 for vRA 7.6. The software components are modular with dependencies. The Kubernetes cluster consists of a single master and 2-5 nodes. Values for the network input are:
- Calico
- Flannel
- Canal
- Kube-Router
- Romana
- Weave
- Tungsten-Fabric
At the time of the initial release, I have only done simple NodePort tests with Calico, Flannel, and Weave. The code is in place for the remaining network plug-ins, but needs testing and confirmation that they work properly.
After importing the blueprint:
- Click on corp1921681100024 and update it to one of your networks
- Click on K8s-Master and update the blueprint and snapshot settings to point to your CentOS 7 template VM, also update the name of your Customization Spec to match what you have in vCenter for your CentOS template
- Click on K8s-Node and update the blueprint and snapshot settings to point to your CentOS 7 template VM, also update the name of your Customization Spec to match what you have in vCenter for your CentOS template
- Click the Edit Custom Form button (Click Yes to Save blueprint)
- Save the YAML code provided below as a text file, then use the Actions menu at the top of the page to Import that file
Simple Custom Form:
layout: pages: - id: general sections: - id: section_89ec6c3e fields: - id: CentOS_K8s_Master~netPlugin display: dropDown state: visible: true read-only: false - id: section_3566b9d4 fields: - id: _leaseDays display: integerField state: visible: true read-only: false - id: section_1fb0e0f8 fields: - id: K8s-Node~_cluster display: integerField state: visible: true read-only: false - id: section_9a954f69 fields: - id: checkbox_d3e0fcec display: checkbox state: visible: true read-only: false - id: section_0502190e fields: - id: Linux__Add_Public_Key_1~auth_key_path display: textField state: read-only: false visible: - equals: checkbox_d3e0fcec: true value: true - id: section_d70ac657 fields: - id: Linux__Add_Public_Key_1~pub_key_text display: textArea state: read-only: false visible: - equals: checkbox_d3e0fcec: true value: true title: General schema: CentOS_K8s_Master~netPlugin: label: Network Plugin description: Network Plugin Name type: dataType: string isMultiple: false default: Calico valueList: - value: Calico label: Calico - value: Flannel label: Flannel - value: Canal label: Canal - value: Kube-Router label: Kube-Router - value: Romana label: Romana - value: Weave label: Weave - value: Tungsten-Fabric label: Tungsten-Fabric constraints: required: true _leaseDays: label: Lease days description: Indicates for how many days the deployed blueprint will be leased. type: dataType: integer isMultiple: false default: '7' constraints: {} K8s-Node~_cluster: label: Worker Node Count type: dataType: integer isMultiple: false default: '2' constraints: max-value: 5 min-value: 2 required: true checkbox_d3e0fcec: label: Add SSH Public Key? signpost: >- Would you like to provide an SSH Public key? This will allow for password-free secure login to the Linux VM once deployed. type: dataType: boolean constraints: required: false Linux__Add_Public_Key_1~auth_key_path: label: Path to authorized_keys file description: Path to SSH authorized_keys file signpost: >- Full path and filename of the SSH authorized_keys file. This is typically in /root/.ssh/authorized_keys or /home/username/.ssh/authorized_keys type: dataType: string isMultiple: false default: /root/.ssh/authorized_keys constraints: required: true Linux__Add_Public_Key_1~pub_key_text: label: Paste SSH Public key in box description: Text of Public Key to be added to authorized_keys signpost: >- Provide the text content of the PUBLIC SSH key to install on guest. This should be the counterpart to your Private key used in putty or other ssh client. type: dataType: string isMultiple: false default: '' constraints: required: false options: externalValidations: []
UPDATE Aug 12, 2019:
- Updated blueprint to work with the current release of Kubernetes - at the time of this update, that is Kubernetes 1.15.2
- Updated Docker software component script to automatically retrieve current release of docker-compose
- Updated Software components to install bash-completion, kubectl bash completion, docker bash completion, and docker-compose bash completion
- Updated blueprint to have minimum 2cpu for Master and 2GB of memory - Same for Workers (Recent updates of Kubernetes resulted in failed master startup due to only single cpu in older version of this blueprint.)
- Updated joinCommand text (my previous hack got broken in recent Kubernetes update)
- Re-confirmed Blueprint includes software component for adding Public SSH Key
UPDATE Nov 28, 2018:
- Updated blueprint work with Kubernetes 1.12.3+
- Changed Docker Installation method (old method is commented out in source)
- Added property to specify Docker Version to install
- Defaulted Docker version to 18.06 since newer versions are not yet supported with Kubernetes 1.12.3
- Updated Custom Form (See YAML above)
- Hopefully resolved issue with joinCommand and masterIPAddress properties - they should not be required on custom form. If added, they can be marked as NO for visible
- NOTE: Custom form issue noted on Oct 24th entry can be fixed using this: https://kb.vmware.com/s/article/59378 . Also, be sure that your Master Node has at least 2GB memory and 2CPUs
UPDATE Oct 24, 2018:
- Updated blueprint to work with vRA 7.5
- Fixed the Helm installation - it wasn't complete in previous versions of this blueprint
- Cleaned up Custom Form yml
- Added optional input to provide SSH public key and import to Master
- NOTE: Screenshots not updated to reflect changes to blueprint and custom form. Additionally, vRA 7.5 has a known issue with regards to Custom Forms not properly loading.
UPDATE Aug 30, 2018:
- Updated Install script for Master Node to use 10.244.0.0/16 for Calico. The default of 192.168.0.0/16 can conflict with home/HOL vPod networks. This update addresses that issue.
Sign in to be able to add comments.