title: error:error parsing yaml , converting YAML to JSON: yaml: line 20: did not find expected '-' indicator Kubernetes
body: <p>Hello folks I'm trying to deploy a nodejs application that runs mongoDB in Kubernetes. In order to accomplish this, I've created a folder named <strong>k8s</strong> and in that folder I have 2 files - <strong>deployment_nodejs.yaml</strong> and <strong>deployment_mongo.yaml</strong>. After run the command <strong>kubectl apply -f k8s</strong>.
  I successfully create the 'deployment_nodejs.yaml' but I <strong>failed</strong> deploying the other one. The error says the following: 'error: error parsing k8s/deployment_mongo.yaml: error converting YAML to JSON: yaml: line 20: did not find expected '-' indicator'.
  I realized that the error might be the <strong>ports</strong> command although I can't understand why because in my opinion I've done anything wrong. Hope you could help me fixing this bug.</p>
  <p>Code of <strong>deployment_mongo.yaml</strong> file:</p>
  <pre><code>kind: PersistentVolumeClaim
  metadata:
    name: mongo-pvc 
  spec:
    accessModes:
      - ReadWriteOnce
    resources:
      requests:
        storage: 256Mi
  
  ---
  apiVersion: v1
  kind: Service
  metadata:
    name: mongo
  spec:
    selector:
      app: mongo
    ports:
    - port: 27017
      targetPort: 27017
  ---
  apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: mongo
  spec: 
    selector: 
      matchLabels: 
        app: mongo
    template:
      metadata:
        labels:
          app: mongo
      specs:
        containers:
          - name: mongo
            image: 3.6.23-xenial
            ports:
              - containerPort: 27017
            volumeMounts: 
              - name: storage
              mountPath: /data/db
        volumes:
          - name: storage
          PersistentVolumeClaim:
            claimName: mongo-pvc 
  </code></pre>