Troubleshooting

Learn about troubleshooting steps that you might find helpful if you run into problems using Migrate for Anthos 1.3.

Executing bash commands on your container

You can access a container through a bash shell using the kubectl exec command.

  1. Use kubectl describe pods to find the name of the Pod in your cluster that you want to connect to.

    In the following example, the command lists the suitecrm-0 pod.

    kubectl describe pods | grep Name
    
    Name:               suitecrm-0
  2. Execute shell commands using one of the following methods:
    • Use kubectl exec to open a bash command shell where you can execute commands.
      kubectl exec -it pod-name -- /bin/bash

      The following example gets a shell to the suitecrm-0 pod:

      kubectl exec -it suitecrm-0 -- /bin/bash
    • Use kubectl exec to execute commands directly.
      kubectl exec -it pod-name -- /bin/bash -c "command(s)"

      The following example lists the root directory of the suitecrm-0 pod:

      kubectl exec -it suitecrm-0 -- /bin/bash -c "ls /"

For more information, see the Kubernetes documentation.

Debugging Kubernetes resources

More help is available at the following pages:

I would like personalized support

Paid support is available for customers migrating with Migrate for Anthos. Reach out so we can help.

Providing information to Google Cloud support

The Sysreport provides Migrate for Anthos support with information about your cluster's configuration for faster time to problem resolution.

You can access the script from Cloud Shell.

  1. Open Cloud Shell

Next, run the collect_sysreport.sh script.

/google/migrate/anthos/collect_sysreport.sh [NAMESPACE] [DEPLOYMENT_NAME] [--workloads]

Where:

  • [NAMESPACE] is the namespace where your Migrate for Anthos components were installed.
  • [DEPLOYMENT_NAME] is name given when you created your Migrate for Anthos deployment in the GKE marketplace.
  • --workloads collects additional data from your migrated workloads. See below for more information.

The script creates anthos-migrate-logs.TIMESTAMP.tar.xz, which you provide to Google Cloud support.

By default, the script collects:

  • Logs from the Migrate for Anthos CSI controller and CSI nodes.
  • Syslog from the Migrate for Anthos CSI node hosts.
  • The output of:
    • kubectl cluster-info
    • kubectl get nodes; kubectl describe node
    • kubectl version
    • kubectl top node

With the --workloads flag enabled, for every workload the script collects:

  • The workload's logs.
  • The output of:
    • ps aux
    • netstat -tlnp
    • iptables -t nat -L
    • fstab
    • kubectl get pod
    • kubectl describe pod
    • kubectl top pod --all-namespaces --containers
    • kubectl cluster-info dump
    • kubectl api-resources -o wide
    • kubectl top pod --all-namespaces --containers
    • kubectl api-resources -o wide
    • kubectl get componentstatuses --all-namespaces
    • kubectl get endpoints --all-namespaces
    • kubectl get events --all-namespaces
    • kubectl describe limits --all-namespaces
    • kubectl get namespaces
    • kubectl describe pvc --all-namespaces
    • kubectl describe pv --all-namespaces
    • kubectl describe quota --all-namespaces
    • kubectl describe sa --all-namespaces
    • kubectl describe services --all-namespaces
    • kubectl describe services --all-namespaces
    • kubectl get ingresses --all-namespaces
    • kubectl describe networkpolicies --all-namespaces
    • kubectl get podsecuritypolicies --all-namespaces
    • kubectl get clusterrolebindings --all-namespaces
    • kubectl describe storageclasses --all-namespaces
    • kubectl describe volumeattachments --all-namespaces