Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

A few issues I had while deploying to GKE #4

Open
micahnz opened this issue Mar 22, 2018 · 1 comment
Open

A few issues I had while deploying to GKE #4

micahnz opened this issue Mar 22, 2018 · 1 comment

Comments

@micahnz
Copy link
Contributor

micahnz commented Mar 22, 2018

For those who run into the same problems as me here are a few notes.

uuidgen and jq commands are not installed by default, I installed it manually with apt-get install jq uuid-runtime. The jq is noted at the top of the bash script but the uuidgen one is not.

The current ismounted check prevented my pods from terminating because there were multiple entries returned by findmnt, the following worked for me.

ismounted() {
  MOUNT=$(findmnt -n ${MNTPATH} 2>/dev/null)
  if [ ! -z "$MOUNT" ]; then
    echo "1"
  else
    echo "0"
  fi
}

I found only setting "chmod +x" did not allow autodiscovery, I had to set 777 on the whole plugins directory and bash script for it to work.

Private GCR repos do not work because the docker cli is not logged in so if you are going to use private docker images you need to run something like this after adding the FlexVolume driver.

sudo su
docker login \
  -u oauth2accesstoken \
  -p "$(curl "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token" -H "Metadata-Flavor: Google" | jq -r '.access_token')" \
  https://asia.gcr.io

Otherwise its working great so thanks!!!

@micahnz
Copy link
Contributor Author

micahnz commented Mar 22, 2018

Also the volume plugin dir for GKE is /home/kubernetes/flexvolume.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant