title: How to connect mysql kubernetes container internally with nodejs k8s container?
body: <p>I have created mysql k8s container and nodejs k8s container under same namespace.I can't able to connect mysql db.(sequalize)</p>
  
  <p>I have tried to connect using '''<a href="http://mysql.e-commerce.svc.cluster.local:3306" rel="nofollow noreferrer">http://mysql.e-commerce.svc.cluster.local:3306</a>'''.But i got "SequelizeHostNotFoundError" error. </p>
  
  <p>Here is my service and deployment yaml files.</p>
  
  <pre><code>kind: Service
  metadata:
   labels:
     app: mysql
   name: mysql
   namespace: e-commerce
  spec:
    type: NodePort
    ports:
    - port: 3306
      targetPort: 3306
      nodePort: 30306
    selector:
      app: mysql
  ---
  apiVersion: extensions/v1beta1
  kind: Deployment
  metadata:
    name: mysql
    namespace: e-commerce
  spec:
    replicas: 1
    template:
      metadata:
        labels:
          app: mysql
      spec:
        containers:
        - image: mysql:5.6
          name: mysql-container
          env:
          - name: MYSQL_ROOT_PASSWORD
            value: password
          ports:
          - containerPort: 3306
            name: mysql
          volumeMounts:
          - name: mysql-persistent-storage
            mountPath: /var/lib/mysql
        volumes:
        - name: mysql-persistent-storage
          persistentVolumeClaim:
            claimName: mysql-pv-claim```
  </code></pre>