kubev2v / forklift-operator

This repository has been archived, development moved to https://github.com/kubev2v/forklift
Apache License 2.0
19 stars 19 forks source link

Insufficient documentation for migrating VMs on k8s via CLI #242

Closed tanaypatankar closed 2 years ago

tanaypatankar commented 2 years ago

I've referred the docs present in https://github.com/konveyor/forklift-operator/blob/main/docs/k8s.md, and https://forklift-docs.konveyor.io/documentation/doc-Migration_Toolkit_for_Virtualization/master/index.html#migrating-virtual-machines-from-cli.

The correct pods are not brought up and there is no k8s specific detailed guide.

fbladilo commented 2 years ago

@tanaypatankar The scope of https://github.com/konveyor/forklift-operator/blob/main/docs/k8s.md is limited to install Forklift on k8s , it is not official Forklift documentation regarding migration of VMs on k8s with CLI, I believe this issue is a better fit for enhancement in the Forklift Documentation official repo :

https://github.com/konveyor/forklift-documentation

With that said, if the OLM installation is failing with k8s.md instructions then we can troubleshoot here.

tanaypatankar commented 2 years ago

@fbladilo You are correct, I'll shift it to the correct repo. OLM installation does go through, but could you clarify what pods are brought up after following k8s.md? I observe only one pod. konveyor-forklift-k88r5 1/1 Running 0 16h

fbladilo commented 2 years ago

@tanaypatankar Assuming your Minikube/OLM installation is healthy and that pod output comes from inside the konveyor-forklift namespace, the pod you see in running state is the catalogsource, I would say that there could be something wrong with the subscription or OLM.

The https://github.com/konveyor/forklift-operator/blob/main/forklift-k8s.yaml manifest creates all the necessary objects for you to bring operator online, that is :

If you are working in the main branch of operator, the manifest will subscribe you to the development channel and deploy the HEAD operator in that channel. Also keep in mind, there are minimum KubeVersion requirements for Forklift latest , v1.23.0 (OCP 4.10).

In your case I would inspect the health of OLM, subscription and perhaps catalogsource:

kubectl -n olm get pods
NAME                                READY   STATUS    RESTARTS        AGE
catalog-operator-755d759b4b-5286j   1/1     Running   9 (7d23h ago)   49d
olm-operator-c755654d4-2447p        1/1     Running   8 (7d23h ago)   49d
packageserver-d9c689b8f-57q7k       1/1     Running   6 (7d23h ago)   49d
packageserver-d9c689b8f-g6pj9       1/1     Running   6 (7d23h ago)   49d

kubectl -n konveyor-forklift get catalogsource konveyor-forklift -o yaml | grep -A4 status:
status:
  connectionState:
    address: konveyor-forklift.konveyor-forklift.svc:50051
    lastConnect: "2022-07-15T14:32:57Z"
    lastObservedState: READY

kubectl -n konveyor-forklift get subscription -o yaml
...

You should see 3 pods if successful , the catalogsource , forklift-operator and packageserver job completed pod:

kubectl -n konveyor-forklift get pods
NAME                                                              READY   STATUS      RESTARTS   AGE
d2d4595bc2822f45ea5aca8f9a09e3c65db3ee5de4574c7bceb7d69363s5rfr   0/1     Completed   0          8m5s
forklift-operator-5489797f8c-zj6l7                                1/1     Running     0          7m56s
konveyor-forklift-bx8pt                                           1/1     Running     0          8m19s

From this point on, you can proceed to create the forkliftcontrollers CR and bring in the rest of components.

I will update k8s.md documentation to perform a health check on OLM and the expected output.

tanaypatankar commented 2 years ago

Hi, sorry for the late response. I completely missed the 1.23 min requirement, so no point in continuing this issue at the moment. Will reopen if I'm unable to get the correct pods up after upgrading. Thanks for your help @fbladilo!