Migrating from OpenshiftSDN to OVNKubernetes CNI
APIs involved in this migrations are:
Network.operator.openshift.ioNetwork.config.openshift.io
Operators involved in this migrations are:
Cluster Network Operator (CNO)Machine Config Operator (MCO)
Refer to pre-requisite steps here, jotted in another post. Update to latest compatible z-stream.
With that taken care, proceed below.
1> Backup existing cluster network config:
# oc get Network.config.openshift.io cluster -o yaml > cluster-openshiftSDN.yaml
2> Verify that OVN_SDN_MIGRATION_TIMEOUT environment variable is set and is
equal to 0s.
3> Set the migration value to null in CNO object cluster:
# oc patch Network.operator.openshift.io cluster --type='merge' --patch '{"spec":{"migration":null}}'
At this time,
CNO updates status of Network.config.openshift.io CR named clusteraccordingly.
MCO rolls out an update to systemd configuration necessary for OVNK, single machine per pool
at a time in series. So time taken is proportionate to size of clusters and number of nodes in it.
4> Delete the openshiftSDN NNCP resource on primary network interface:
# oc get nncp
NAME STATUS REASON
bondmaster0 Available SuccessfullyConfigured
# oc delete nncp bondmaster0
5> Set Migration field to “networkType: OVNKubernetes” in CNO
object cluster:
# oc patch Network.operator.openshift.io cluster
--type='merge'
--patch '{
"spec":
{ "migration":
{ "networkType":"OVNKubernetes"
} } }'
At this time, CNO
Destroys the openshift SDN control plane pods.Deploys OVNK control plane pods.Updates the Multus daemon sets and config map objects to
reflect new CNI plugin.
6> Check the reboots of nodes have finished, post upgrade belonging to MCP pools, by running:
# oc get mcp
Status for Nodes in MCP group should be showing 'READY'
7> Check all cluster operators are avialable :
# oc get co
8> Following parameters can be customized per needs:
#oc patch Network.operator.openshift.io cluster
--type=merge
--patch
'{
"spec":
{ "defaultNetwork": { "ovnKubernetesConfig":
{ "mtu":<mtu>,
"genevePort":<port>,
"v4InternalSubnet":"<ipv4_subnet>",
"v6InternalSubnet":"<ipv6_subnet>"
}}}}'
9> Disable few features from OpenshiftSDN, that mght have been used earlier and not supported
by OVNK.
# oc patch Network.operator.openshift.io cluster
--type='merge'
--patch
'{
"spec":
{ "migration":
{ "networkType": "OVNKubernetes", "
features": {
"egressIP": false,
"egressFirewall": false,
"multicast": false
} } } }'
Comments
Post a Comment