Provide a "no cni mode" in OpenPAI
Sometimes k8s network plugin causes some problems in OpenPAI. Users can follow the steps below to solve the problem:
-
remove CNI in Kubernetes Detailed steps are provided here : https://openpai.readthedocs.io/en/latest/manual/cluster-admin/installation-faqs-and-troubleshooting.html#how-to-remove-the-k8s-network-plugin
-
change OpenPAI source code
- Change pylon and rest-server to use hostNetwork
- Change pylon/rest-server config, make them use “localhost” to connect PAI service in master node
- Change hivedScheduler service type from “NodePort” to “ClusterIP”
The solution is not easy to perform. Maybe we can provide a "no cni mode" in OpenPAI for this need.
Maybe we could deploy a simple cni, such as kubenet https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/#kubenet. More refer: https://docs.microsoft.com/en-us/azure/aks/configure-kubenet
I'm not sure if this could solve our issue
@Binyang2014 is kubenet available in Kubespray?
kubespry doesn't support it... https://github.com/kubernetes-sigs/kubespray/blob/daed3e5b6a085ac99e076b51d314fcf76e4127b4/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml#L33
But it support a plugin called cni https://github.com/kubernetes-sigs/kubespray/blob/master/docs/cni.md. It only unpack cni binaries into /opt/cni/bin. Then we can customize kubelet to use kubenet. Seems it works from the doc