MCAS server can run on a dedicated cluster as well as cloud native service. This document introduces how to setup MCAS in kubernetes environment. The document only deploy MCAS server as a pod. Users may change the pod into deployment/service based on their own needs. MCAS client can be deployed as a kubernetes pod using the same way.
-
Follow instructions to install a container runtime.
Note: only docker has been tested.
-
Follow instructions to install kubernetes runtime.
Note: To use RDMA and multus CNI, install earlier version of kubernetes (e.g., 1.13.0)
-
Follow instructions to setup kubernetes cluster.
Note: Only Flannel CNI has been tested.
-
(Optional) Follow instructions to setup RDMA in HCA or SRIOV mode.
- Build image:
docker build -f $MCAS_HOME/deploy/kubernetes/Dockerfile.mcas -t res-mcas-docker-local.artifactory.swg-devops.com/mcas:latest $MCAS_HOME
- Push image:
docker push res-mcas-docker-local.artifactory.swg-devops.com/mcas:latest
- (Optional) Run docker image local:
docker run --rm -it --privileged --cap-add=ALL -v /dev:/dev -v /lib/modules:/lib/modules --net=host --device=/dev/infiniband/uverbs0 --device=/dev/infiniband/rdma_cm --ulimit memlock=-1 res-mcas-docker-local.artifactory.swg-devops.com/mcas:latest bash
- Make sure kubernetes cluster is up and run, in your control pane:
kubectl get nodes
- Create configmap with your own config file you want to pass
kubectl configmap mcas-config --from-file <mcas config file>
- Edit $MCAS_HOME/deploy/kubernetes/mcas-server.yaml to configure the MCAS pod (e.g., setup volume, parameters).
- Deploy MCAS on kubernetes cluster, in your control pane:
kubectl apply -f $MCAS_HOME/deploy/kubernetes/mcas-server.yaml