mikeghen / kubernetes-gcs-sftp

SFTP Server using Google Cloud Storage
62 stars 16 forks source link

Just met "Pod errors: CrashLoopBackOff" when I use "kubectl create -f sftp.yaml" #1

Open cpwujoewu opened 6 years ago

cpwujoewu commented 6 years ago

Greetings:

I just follow your step to setup the sftp-gcs kubernetes service, but I can't run it successfully. The only difference is that I run the service on GKE directly, not using minikube.

I create a two node cluster. build docker images on it and push the image to gcloud. finally I modify the yaml file, changing the image location, and use kubectl to create the deployment.

sftp service runs well, but sftp-deployment fail. Error msg is below

Error syncing pod FailedSync 2018年3月17日 下午6:04:17 2018年3月17日 下午6:19:12 68
Started container Started 2018年3月17日 下午6:04:13 2018年3月17日 下午6:05:01 4
Container image "asia.gcr.io/persistent-volume/sftp:latest" already present on machine Pulled 2018年3月17日 下午6:04:13 2018年3月17日 下午6:05:00 4
Created container Created 2018年3月17日 下午6:04:13 2018年3月17日 下午6:05:00 4
Back-off restarting failed container BackOff 2018年3月17日 下午6:04:17 2018年3月17日 下午6:04:47 4
Successfully assigned sftp-deployment-6c4647cf5d-4vzw8 to gke-sftp-default-pool-06f97e64-4chs Scheduled 2018年3月17日 下午6:04:12 2018年3月17日 下午6:04:12 1
MountVolume.SetUp succeeded for volume "gcs-mounts" SuccessfulMountVolume 2018年3月17日 下午6:04:12 2018年3月17日 下午6:04:12 1
MountVolume.SetUp succeeded for volume "users" SuccessfulMountVolume 2018年3月17日 下午6:04:12 2018年3月17日 下午6:04:12 1
MountVolume.SetUp succeeded for volume "sftp-gcloud-key" SuccessfulMountVolume 2018年3月17日 下午6:04:12 2018年3月17日 下午6:04:12 1
MountVolume.SetUp succeeded for volume "default-token-5887x" SuccessfulMountVolume 2018年3月17日 下午6:04:12 2018年3月17日 下午6:04:12 1

do I miss anything when building this service?

Thank You very much

cpwujoewu commented 6 years ago

I find the problem. In etc/sftp.d/gcs-mounts.sh, it uses partner1 and partner2 as default but in etc/sftp/users.conf, it uses user1 and user2 as default

so when run the deployment, it will not find user "partner1" and "partner2"

thank you very much!