FIPS 140-2 Compliance in Google Kubernetes Engine
Overview
Section titled “Overview”Federal Information Processing Standard (FIPS) 140-2 is a U.S. government standard that defines minimum security requirements for cryptographic modules. This guide covers FIPS-compliant storage options in GKE and how to implement them for both Autopilot and Standard clusters.
FIPS Compliance in GKE
Section titled “FIPS Compliance in GKE”GKE provides FIPS 140-2 compliance through:
- Validated Cryptographic Modules: Google Cloud uses FIPS 140-2 validated modules for encryption
- FIPS-mode Operating System: Container-Optimized OS (COS) with FIPS mode enabled
- Compliant Storage Options: Multiple storage backends with FIPS validation
- Network Encryption: TLS 1.2+ with FIPS-approved algorithms
Storage Options Comparison
Section titled “Storage Options Comparison”| Storage Option | Autopilot Support | Standard Support | FIPS 140-2 Compliance | Notes (Encryption & Access) |
|---|---|---|---|---|
| GCE Persistent Disk (Block Storage) | Yes (default PV) | Yes (default PV) | Yes – Encrypted at rest by default using FIPS 140-2 validated module | Block storage (zonal or regional); single-writer (RWO) access. |
| Cloud Storage Bucket (GCS FUSE CSI) | Yes (with CSI) | Yes (with CSI) | Yes – Encrypted at rest by default (AES-256 via FIPS module) | Object storage mounted via CSI driver; uses TLS in transit. |
| Filestore (Managed NFS) | Yes (with CSI) | Yes (with CSI) | Yes – Encrypted at rest by default (FedRAMP-authorized storage) | NFS file storage (multi-writer RWX); within VPC for in-transit protection. |
| Local SSD (Ephemeral node disk) | No | Yes (node config) | No (Default) – Not FIPS-validated by default; requires additional FIPS encryption in software. | High-performance ephemeral disk on node; not persistent across node restart. |
| NetApp Cloud Volumes (CVS) | Limited † | Yes (via CSI) | Yes – Encrypted at rest by Google (FIPS module) + optional NetApp FIPS encryption | Managed NFS/SMB service; uses Astra Trident CSI in GKE; TLS 1.2 for data transfer. |
| Portworx (PX Enterprise SDS) | No | Yes (via DaemonSet) | Configurable – Uses FIPS 140-2 certified crypto for volume encryption when enabled | Software-defined storage inside cluster; encrypts volumes with FIPS-compliant libraries. |
| Other Vendor Storage (Ceph, etc.) | Varies | Yes (via CSI) | Configurable – Depends on vendor (must use FIPS-validated encryption on backend). | E.g. Ceph/Rook or storage array CSI drivers; generally Standard cluster only. |
† NetApp CVS in Autopilot requires specific configurations and may have limitations
Implementing FIPS-Compliant Storage
Section titled “Implementing FIPS-Compliant Storage”1. GCE Persistent Disks (Recommended Default)
Section titled “1. GCE Persistent Disks (Recommended Default)”Create FIPS-compliant persistent disk:
apiVersion: v1kind: PersistentVolumeClaimmetadata: name: fips-pvcspec: accessModes: - ReadWriteOnce resources: requests: storage: 100Gi storageClassName: standard-rwo # Uses GCE PD with FIPS encryptionVerify disk encryption:
# Get disk name from PVCDISK_NAME=$(kubectl get pvc fips-pvc -o jsonpath='{.spec.volumeName}')
# Check disk encryptiongcloud compute disks describe $DISK_NAME \ --zone=ZONE \ --format="value(diskEncryptionKey)"2. Cloud Storage with GCS FUSE CSI
Section titled “2. Cloud Storage with GCS FUSE CSI”Enable GCS FUSE CSI driver:
# For new clustergcloud container clusters create CLUSTER_NAME \ --addons=GcsFuseCsiDriver \ --zone=ZONE
# For existing clustergcloud container clusters update CLUSTER_NAME \ --update-addons=GcsFuseCsiDriver=ENABLED \ --zone=ZONECreate FIPS-compliant GCS bucket storage:
apiVersion: v1kind: PersistentVolumeClaimmetadata: name: gcs-fips-pvcspec: accessModes: - ReadWriteMany resources: requests: storage: 100Gi storageClassName: gcsfuse-csi3. Filestore for Multi-Writer Access
Section titled “3. Filestore for Multi-Writer Access”Create Filestore instance with CMEK:
# Create KMS key for additional encryption layergcloud kms keyrings create filestore-keyring \ --location=us-central1
gcloud kms keys create filestore-key \ --location=us-central1 \ --keyring=filestore-keyring \ --purpose=encryption
# Create Filestore with CMEKgcloud filestore instances create fips-filestore \ --tier=BASIC_HDD \ --file-share=name=vol1,capacity=1TB \ --network=name=default \ --zone=us-central1-a \ --kms-key=projects/PROJECT_ID/locations/us-central1/keyRings/filestore-keyring/cryptoKeys/filestore-keyMount in GKE:
apiVersion: v1kind: PersistentVolumemetadata: name: filestore-pvspec: capacity: storage: 1Ti accessModes: - ReadWriteMany nfs: server: FILESTORE_IP path: /vol1 storageClassName: ""4. Configuring FIPS Mode on Nodes
Section titled “4. Configuring FIPS Mode on Nodes”Create node pool with FIPS mode enabled:
gcloud container node-pools create fips-pool \ --cluster=CLUSTER_NAME \ --zone=ZONE \ --image-type=COS_CONTAINERD \ --metadata=google-compute-enable-fips=TRUE \ --machine-type=n2-standard-4 \ --num-nodes=3Verify FIPS mode on nodes:
# SSH into node and check FIPS statuskubectl debug node/NODE_NAME -it --image=busyboxcat /proc/sys/crypto/fips_enabled # Should return "1"Compliance Verification
Section titled “Compliance Verification”Check Storage Encryption Status
Section titled “Check Storage Encryption Status”#!/bin/bash# Audit all PVCs for encryption compliance
echo "=== PVC Encryption Audit ==="for pvc in $(kubectl get pvc -A -o custom-columns=NAMESPACE:.metadata.namespace,NAME:.metadata.name --no-headers); do namespace=$(echo $pvc | awk '{print $1}') name=$(echo $pvc | awk '{print $2}')
# Get backing disk pv=$(kubectl get pvc $name -n $namespace -o jsonpath='{.spec.volumeName}') disk_name=$(kubectl get pv $pv -o jsonpath='{.spec.gcePersistentDisk.pdName}' 2>/dev/null)
if [ ! -z "$disk_name" ]; then echo "PVC: $namespace/$name (Disk: $disk_name)" gcloud compute disks describe $disk_name --zone=ZONE --format="value(diskEncryptionKey.kmsKeyName)" fidoneValidate FIPS Module Usage
Section titled “Validate FIPS Module Usage”# Check GKE cluster for FIPS compliance indicatorsgcloud container clusters describe CLUSTER_NAME \ --zone=ZONE \ --format="yaml(nodeConfig.metadata,nodePools[].config.metadata)"
# Verify TLS configurationkubectl get deployments -A -o yaml | grep -E "tls|TLS" | grep -i versionBest Practices for FIPS Compliance
Section titled “Best Practices for FIPS Compliance”-
Always Use Encrypted Storage Classes
- Default GCE PD storage classes provide FIPS encryption
- Avoid local SSDs unless implementing software encryption
-
Enable FIPS Mode on All Nodes
Terminal window # Ensure all node pools have FIPS metadata--metadata=google-compute-enable-fips=TRUE -
Use Customer-Managed Encryption Keys (CMEK)
Terminal window # Additional encryption layer with Cloud KMS--disk-encryption-key=projects/PROJECT/locations/LOCATION/keyRings/RING/cryptoKeys/KEY -
Implement Network Encryption
- Use Istio/Anthos Service Mesh for mTLS between pods
- Ensure all external traffic uses TLS 1.2+
-
Regular Compliance Audits
- Scan for unencrypted volumes
- Verify FIPS mode on all nodes
- Check certificate compliance
Troubleshooting
Section titled “Troubleshooting”Issue: Local SSD FIPS Compliance
Section titled “Issue: Local SSD FIPS Compliance”Problem: Local SSDs are not FIPS-compliant by default
Solution: Implement software encryption
apiVersion: v1kind: ConfigMapmetadata: name: fips-encryption-scriptdata: setup.sh: | #!/bin/bash # Setup dm-crypt with FIPS-approved algorithms cryptsetup luksFormat /dev/sdb --cipher aes-xts-plain64 --key-size 256 cryptsetup luksOpen /dev/sdb encrypted-local-ssd mkfs.ext4 /dev/mapper/encrypted-local-ssd mount /dev/mapper/encrypted-local-ssd /mnt/encryptedIssue: Verifying Encryption in Transit
Section titled “Issue: Verifying Encryption in Transit”Check pod-to-pod encryption:
# Deploy network policy testerkubectl apply -f https://github.com/ahmetb/kubernetes-network-policy-recipes/raw/master/04-deny-traffic-from-other-namespaces.yaml
# Verify TLS between serviceskubectl exec -it POD_NAME -- openssl s_client -connect SERVICE:PORT -tls1_2Additional Resources
Section titled “Additional Resources”Page provenance
Community-maintained guidance. Use the edit link below to propose a sourced correction.
Was this page useful?
Help us prioritize the next improvement.