1

I'm following this doc to test migrating a GCE VM to GKE, but it is unclear to me what happens to my systemd services after the migration. Usually containers are used to run a single application instead of lots of daemons.

I tried to see if systemd services are running in the Pod, but failed:

$ kubectl exec -it my-app-0 -- systemctl status
System has not been booted with systemd as init system (PID 1). Can't operate.
command terminated with exit code 1

I think the doc needs to be improved to include more details about what's going on with the Pod after the migration. In addition to systemd services, what is the entrypoint of the container in the Pod?

Dagang
  • 24,586
  • 26
  • 88
  • 133

1 Answers1

1

For migrated containers, this should give you the desired result:
kubectl exec -it my-app-0 -- bash -c "systemctl status"

L.V.
  • 36
  • 1