You can deploy Virtlet on either new or existing MCP cluster using the
procedure below. By default, Virtlet is deployed on all Kubernetes Nodes
(cmp
).
To deploy Virtlet on a new MCP cluster:
When generating a deployment metadata model using the ModelDesigner UI, select the Virtlet enabled check box in the Kubernetes Product parameters section.
Open your Git project repository.
In classes/cluster/<cluster-name>/kubernetes/init.yml
, verify that
Virtlet is enabled:
parameters:
_param:
kubernetes_virtlet_enabled: True
Optional. In classes/cluster/<cluster-name>/kubernetes/compute.yml
,
modify the kubernetes:common:addons:virtlet:
parameters
as required to define the Virtlet namespace and image path as well as
the number of compute nodes on which you want to enable Virtlet.
For example:
parameters:
kubernetes:
common:
addons:
virtlet:
enabled: true
namespace: kube-system
image: mirantis/virtlet:latest
If your networking system is OpenContrail, add the following
snippet to classes/cluster/<cluster-name>/opencontrail/compute.yml
:
kubernetes:
pool:
network:
hash: 77169cdadb80a5e33e9d9fe093ed0d99
Proceed with further MCP cluster configuration. Virtlet will be automatically deployed during the Kubernetes cluster deployment.
To deploy Virtlet on an existing MCP cluster:
Open your Git project repository.
In classes/cluster/<cluster-name>/kubernetes/compute.yml
, add
the following snippet:
parameters:
kubernetes:
common:
addons:
virtlet:
enabled: true
namespace: kube-system
image: mirantis/virtlet:latest
Modify the kubernetes:common:addons:virtlet:
parameters
as required to define the Virtlet namespace and image path as well as
the number of compute nodes on which you want to enable Virtlet.
If your networking system is OpenContrail, add the following
snippet to classes/cluster/<cluster-name>/opencontrail/compute.yml
:
kubernetes:
pool:
network:
hash: 77169cdadb80a5e33e9d9fe093ed0d99
Commit and push the changes to the project Git repository.
Log in to the Salt Master node.
Update your Salt formulas and the system level of your repository:
/srv/salt/reclass
.Apply the following states:
salt -C 'I@kubernetes:pool and not I@kubernetes:master' state.sls kubernetes.pool
salt -C 'I@kubernetes:master' state.sls kubernetes.master.kube-addons
salt -C 'I@kubernetes:master' state.sls kubernetes.master.setup
See also