Mounting XFS on GKE

  1. The default image on GKE is gci, based on ChromiumOS, which does not have a straightforward method for installing packages for xfs.
  2. container-vm does have xfsprogs, but is not installed by default
  3. Custom images are not supported on GKE.
  4. There’s no standard/recommended method for running node startup scripts.

Putting it together

  1. Create a node-pool using thecontainer-vmimage.
  2. Build the startup script Docker image
  3. Create a startup-script daemonset based on Kubernetes' startup-script example.
  4. Add the daemonset to kubernetes
  5. Create an empty disk on GCE.
  6. Create a PersistentVolumewith fsType:xfs.
  7. Apply the PersistentVolume and Kubernetes will format the disk to xfs on mount.
daemonset.yaml

The Adventures of Me

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Allan Lei

Allan Lei

The Adventures of Me

More from Medium

Fix Kubernetes Cron Job invalid: spec.template field is immutable

Creating HTTPS/TLS Route by HELM inOpenshift/OCP

Installing Containerized Applications on Internet-Restricted Environments

Rancher CIS operator