Hi there!

I'm having some issues where I cannot successfully mount a disk to a container 
all of a sudden. We haven't changed our codebase in a while, but I'm sure it's 
something silly I did, but I can't seem to find any documentation. This is the 
yaml file we apply. 

apiVersion: v1
kind: Service
metadata:
  labels:
    app: cassandra
  name: cassandra
spec:
  clusterIP: None
  ports:
    - port: 9042
      name: cql
    - port: 7199
      name: jmx
    - port: 9160
      name: thrift
  selector:
    app: cassandra
---

apiVersion: "apps/v1beta1"
kind: StatefulSet
metadata:
  name: cassandra
spec:
  serviceName: cassandra
  replicas: 4
  template:
    metadata:
      labels:
        app: cassandra
    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                  - key: "app"
                    operator: In
                    values:
                    - cassandra
              topologyKey: "kubernetes.io/hostname"
      containers:
      - name: cassandra
        image: cassandra:3.10
        imagePullPolicy: Always
        ports:
        - containerPort: 7000
          name: intra-node
        - containerPort: 7001
          name: tls-intra-node
        - containerPort: 7199
          name: jmx
        - containerPort: 9042
          name: cql
        - containerPort: 9160
          name: thrift
        env:
          - name: CASSANDRA_SEEDS
            value: 
cassandra-0.cassandra.default.svc.cluster.local,cassandra-1.cassandra.default.svc.cluster.local,cassandra-2.cassandra.default.svc.cluster.local

          - name: MAX_HEAP_SIZE
            value: 512M
          - name: HEAP_NEWSIZE
            value: 100M
          - name: CASSANDRA_CLUSTER_NAME
            value: "Cassandra"
          - name: CASSANDRA_DC
            value: "DC1"
          - name: CASSANDRA_RACK
            value: "Rack1"
          - name: CASSANDRA_ENDPOINT_SNITCH
            value: GossipingPropertyFileSnitch
          - name: CASSANDRA_START_RPC
            value: "true"
        volumeMounts:
        - name: cassandra-data
          mountPath: /var/lib/cassandra
  volumeClaimTemplates:
  - metadata:
      name: cassandra-data
      annotations:
        volume.beta.kubernetes.io/storage-class: standard
    spec:
      accessModes: [ "ReadWriteOnce" ]
      resources:
        requests:
          storage: 40Gi


This is the error I'm getting on container create.

Events:
  Type     Reason       Age                From                                 
            Message
  ----     ------       ----               ----                                 
            -------
  Warning  FailedMount  52s (x40 over 1h)  kubelet, 
gke-cluster-default-pool-3b2d595e-039l  Unable to mount volumes for pod 
"cassandra-0_default(f4055c8e-4d90-11e8-8965-42010af001be)": timeout expired 
waiting for volumes to attach/mount for pod "default"/"cassandra-0". list of 
unattached/unmounted volumes=[cassandra-data]
  Warning  FailedSync   52s (x40 over 1h)  kubelet, 
gke-cluster-default-pool-3b2d595e-039l  Error syncing pod
  Warning  FailedMount  1s (x46 over 1h)   attachdetach                         
            AttachVolume.Attach failed for volume 
"pvc-ce2baedb-4d90-11e8-8965-42010af001be" : googleapi: Error 400: Invalid 
value at 'disk.type' (TYPE_ENUM), 
"https://www.googleapis.com/compute/v1/projects/commersive/zones/us-east1-d/diskTypes/pd-standard";,
 badRequest

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to