<p>I have deployed a Drupal Instance but i see that the instance Endpoint are not visible although the containers deployed successfully.</p>
<p>Container logs don't point to any direction</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: drupal-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: drupal
      type: frontend
  template:
    metadata:
      labels:
        app: drupal
    spec:
      containers:
      - name: drupal
        image: drupal
        resources:
          limits:
            memory: &quot;128Mi&quot;
            cpu: &quot;500m&quot;
        ports:
        - containerPort: 80
 
**********************
apiVersion: v1
kind: Service
metadata:
  name: drupal-service
 
spec: 
  type: NodePort
  ports: 
    - targetPort: 80
      port: 80
      nodePort: 30010
  selector: 
      app: drupal
      type: frontend
************************`
</code></pre>
<pre><code>root@ip-172-31-32-54:~# microk8s.kubectl get pods
NAME                                READY   STATUS    RESTARTS   AGE
drupal-deployment-6fdd7975f-l4j2z   1/1     Running   0          9h
drupal-deployment-6fdd7975f-p7sfz   1/1     Running   0          9h
root@ip-172-31-32-54:~# microk8s.kubectl get services
NAME             TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)        AGE
drupal-service   NodePort    10.152.183.6   &lt;none&gt;        80:30010/TCP   9h
kubernetes       ClusterIP   10.152.183.1   &lt;none&gt;        443/TCP        34h
***********************
root@ip-172-31-32-54:~# microk8s.kubectl describe service drupal-service
Name:                     drupal-service
Namespace:                default
Labels:                   &lt;none&gt;
Annotations:              &lt;none&gt;
Selector:                 app=drupal,type=frontend
Type:                     NodePort
IP:                       10.152.183.6
Port:                     &lt;unset&gt;  80/TCP
TargetPort:               80/TCP
NodePort:                 &lt;unset&gt;  30010/TCP
Endpoints:                &lt;none&gt;
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   &lt;none&gt;
</code></pre>
<p>Any directions is really helpful.</p>
<p>NOTE: This works perfectly when running a container using the command</p>
<pre><code>docker run --name some-drupal -p 8080:80 -d drupal
</code></pre>
<p>Thank you,
Anish</p>

anish anil
<p>Your service selector has two values:</p>
<pre><code>Selector:                 app=drupal,type=frontend
</code></pre>
<p>but your pod has only one of these:</p>
<pre><code>spec:
  template:
    metadata:
      labels:
        app: drupal
</code></pre>
<p>Just make sure that all labels required by the service actually exist on the pod.</p>
<p>Like following:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: drupal-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: drupal
      type: frontend
  template:
    metadata:
      labels:
        app: drupal
        type: frontend   #     &lt;--------- look here
    spec:
      containers:
      - name: drupal
        image: drupal
        resources:
          limits:
            memory: &quot;128Mi&quot;
            cpu: &quot;500m&quot;
        ports:
        - containerPort: 80
</code></pre>
