<ol>
<li>trying to follow kubernetes tutorial<a href="https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/" rel="nofollow noreferrer">[1]</a>Example: Deploying WordPress and MySQL with Persistent Volumes;</li>
<li>run    command 'kubectl apply -f wordpress-deployment.yaml' on google    kubernetes using cloudshell;</li>
<li>got this error: error parsing    wordpress-deployment.yaml: error converting YAML to JSON: yaml: line    33: could not find expected ':'</li>
</ol>
<p>[<a href="https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/" rel="nofollow noreferrer">1</a>]<a href="https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/" rel="nofollow noreferrer">https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/</a></p>
<p>/**
UPDATE: Thanks ! I decided to use one click setup for the wordpress docker development environment
<a href="https://console.cloud.google.com/marketplace/details/google/wordpress" rel="nofollow noreferrer">https://console.cloud.google.com/marketplace/details/google/wordpress</a>
**/</p>
<p><strong>wordpress-deployment.yaml</strong></p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: wordpress
  labels:
    app: wordpress
spec:
  ports:
    - port: 80
  selector:
    app: wordpress
    tier: frontend
  type: LoadBalancer
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: wp-pv-claim
  labels:
    app: wordpress
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 20Gi
---
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: wordpress
  labels:
    app: wordpress
spec:
  selector:
    matchLabels:
      app: wordpress
      tier: frontend
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: wordpress
        tier: frontend
    spec:
      containers:
      - image: wordpress:4.8-apache
        name: wordpress
        env:
        - name: WORDPRESS_DB_HOST
          value: 34.72.250.151
        - name: WORDPRESS_DB_PASSWORD
          valueFrom:
            secretKeyRef:
              name: mysql-pass
              key: password
        - name: WORDPRESS_DB_USER
          valueFrom：
           secretkeyRef:
            name: mysql-pass
        ports:
        - containerPort: 80
          name: wordpress
        volumeMounts:
        - name: wordpress-persistent-storage
          mountPath: /var/www/html
      volumes:
      - name: wordpress-persistent-storage
        persistentVolumeClaim:
          claimName: wp-pv-claim
</code></pre>

Arthur
<p>There is 3 problems in the below code snippet in yaml file.</p>
<ol>
<li><p>There is a space after <strong>valueFrom:</strong> key in below snippet, delete the white space after &quot;:&quot;</p>
</li>
<li><p>In secretKeyRef key, 'K' should be in upper case (secretKeyRef).</p>
</li>
<li><p>secretKeyRef is missing 'key' value.</p>
<pre><code>- name: WORDPRESS_DB_USER
           valueFrom：
            secretkeyRef:
             name: mysql-pass 
</code></pre>
</li>
</ol>
<p>Should look like.</p>
<pre><code>- name: WORDPRESS_DB_USER
          valueFrom:
           secretKeyRef:
            name: mysql-pass
            key: username
</code></pre>
<p>Thanks,</p>
