Manage Single Cluster CN2
SUMMARY Learn how to perform life cycle management tasks in a single cluster installation or within a specific cluster in a multi-cluster installation.
Overview
The way that you manage a Kubernetes cluster does not change when CN2 is the CNI plug-in. Once CN2 is installed, CN2 components work seamlessly with Kubernetes components to provide the networking infrastructure.
The Contrail controller is constantly watching and reacting to cluster events as they occur. When you add a new node, the Contrail data plane components are automatically deployed. When you delete a node, the Contrail controller automatically deletes networking resources associated with that node. CN2 works seamlessly with kubectl and other tools such as Prometheus and Grafana.
In addition to standard Kubernetes management tools, you can use tools and procedures that are specific to CN2. This section covers these tools and procedures.
Run Preflight and Postflight Checks
Use this procedure to run preflight or postflight checks on all cluster nodes.
Preflight checks allow you to verify that your cluster nodes can support CN2. The checks test for resource capacity, kernel compability, network reachability, and other infrastructure requirements. You typically run preflight checks prior to installing CN2, but you can run these checks after installing CN2 as well.
Postflight checks allow you to verify that your CN2 installation is working properly. The checks test for status, pod-to-pod communication, API server reachability, and other basic functions. You run postflight checks after installing CN2.
Before you can run this procedure, ensure you've installed the ContrailReadiness controller. The ContrailReadiness controller provides the framework for preflight and postflight checks.
Upgrade CN2
Use this procedure to upgrade CN2.
The Contrail controller consists of Deployments and StatefulSets, which are configured for rolling updates. During the upgrade, the pods in each Deployment and StatefulSet are upgraded one at a time. The remaining pods in that Deployment or StatefulSet remain operational. This enables Contrail controller upgrades to be hitless.
The Contrail data plane consists of a DaemonSet with a single vRouter pod. During the upgrade procedure, this single pod is taken down and upgraded. Because of this, Contrail data plane upgrades are not hitless. If desired, migrate traffic off of the node being upgraded prior to performing the upgrade.
You upgrade CN2 software by porting the contents of your existing manifests to the new manifests, and then applying the new manifests. All CN2 manifests must reference the same software version.
Before you upgrade, check to make sure that each node has at least one
allocatable pod available. The upgrade procedure temporarily allocates an
additional pod, which means that your node cannot be running at maximum pod
capacity when you perform the upgrade. You can check pod capacity on a node
by using the kubectl describe node
command.
Uninstall CN2
Use this procedure to uninstall CN2.
This tool removes the following:
- contrail namespace and resources that belong to that namespace
- contrail-system namespace and resources that belong to that namespace
- contrail-deploy namespace and resources that belong to that namespace
- default-global-vrouter-config and default-global-system-config
Before you can run this procedure, ensure you've installed the ContrailReadiness controller. The ContrailReadiness controller provides the framework for the uninstall task.
Since there are interdependencies between CN2 components, don't try to delete CN2 components individually. The provided tool uninstalls CN2 components gracefully and in the proper sequence.