Monitoring a Cluster Installation

View the logs for the Kubernetes Cluster API pods to monitor the creation of a Kubernetes cluster on Oracle Linux Virtualization Manager.

You can monitor the deployment of a Kubernetes cluster on Oracle Linux Virtualization Manager by reviewing the logs of several Kubernetes Cluster API pods that are created in the management cluster. You can also view information about Kubernetes machine objects created by the Kubernetes Cluster API.

Tip:

If you set the cluster to be self managed, the ephemeral cluster is deleted after the deployment succeeds. To view the logs after the ephemeral cluster is deleted, set the cluster's kubeconfig file to the workload cluster running on Oracle Linux Virtualization Manager, for example:

export KUBECONFIG=$(ocne cluster show --cluster-name cluster-name)

Where cluster_name is the name of the workload cluster.

  1. Set the location of the kubeconfig file for the management cluster.

    In a separate terminal session, set the location of the management cluster's kubeconfig file.

    export KUBECONFIG=$(ocne cluster show --cluster-name cluster-name)

    Where cluster_name is the name of the management cluster.

  2. View the events.

    Use the kubectl get events command to get information about the events in the namespace in which the cluster is created. The default namespace is olvm. For example:

    kubectl get events --namespace olvm
  3. View the Machine objects.

    Use the kubectl get machine command to get information about the Kubernetes Machine objects.

    kubectl get machine --namespace olvm

    The NAME of each VM matches the VM name in Oracle Linux Virtualization Manager. If the nodes are created successfully, the PHASE column is Running for each Machine.

    To get more information about each Machine, use the kubectl describe command, for example:

    kubectl describe machine --namespace olvm cluster_name-control-plane-ID
  4. View the OLVMMachine objects.

    Use the kubectl get olvmmachine command to get information about the Kubernetes OLVMMachine objects.

    kubectl get olvmmachine --namespace olvm

    Again, the NAME of each VM matches the VM name in Oracle Linux Virtualization Manager. If the nodes are created successfully, the READY column is true for each Machine.

    To get more information about each OLVMMachine, use the kubectl describe command, for example:

    kubectl describe olvmmachine --namespace olvm cluster_name-control-plane-ID
  5. View the core-capi-controller-manager pod logs.

    Use the kubectl logs command to view the logs for the pod.

    Copy the command listed and press the Tab key to access the full pod name.

    kubectl logs --namespace capi-system core-capi-controller-manager
  6. View the olvm-capi-controller-manager pod logs.

    Use the kubectl logs command to view the logs for the pod.

    Copy the command listed and press the Tab key to access the full pod name.

    kubectl logs --namespace cluster-api-provider-olvm olvm-capi-controller-manager
  7. View the control-plane-capi-controller-manager pod logs.

    Use the kubectl logs command to view the logs for the pod.

    Copy the command listed and press the Tab key to access the full pod name.

    kubectl logs --namespace capi-kubeadm-control-plane-system control-plane-capi-controller-manager
  8. View the bootstrap-capi-controller-manager pod logs.

    Use the kubectl logs command to view the logs for the pod.

    Copy the command listed and press the Tab key to access the full pod name.

    kubectl logs --namespace capi-kubeadm-bootstrap-system bootstrap-capi-controller-manager