<p>I am leaning Kubernetes,have applied secrets to my previously running deployments. Now, I have problem that I can not run my site</p>

<pre><code>kubectl get ep -o wide
NAME                ENDPOINTS                                                      AGE
hello-node          172.17.0.8:8080                                                2d21h
kubernetes          192.168.99.101:8443                                            3d
tomcat-deployment   172.17.0.10:8080,172.17.0.6:8080,172.17.0.7:8080 + 1 more...   2d16h
wordpress                                                                          24h
wordpress-mysql     172.17.0.15:3306                                               24h
</code></pre>

<p>Describe output</p>

<pre><code>Name:               wordpress
Namespace:          default
CreationTimestamp:  Tue, 12 Mar 2019 09:10:24 +0100
Labels:             app=wordpress
Annotations:        deployment.kubernetes.io/revision: 1
                    kubectl.kubernetes.io/last-applied-configuration:
                      {"apiVersion":"apps/v1beta2","kind":"Deployment","metadata":{"annotations":{},"labels":{"app":"wordpress"},"name":"wordpress","namespace":...
Selector:           app=wordpress,tier=frontend
Replicas:           1 desired | 1 updated | 1 total | 0 available | 1 unavailable
StrategyType:       Recreate
MinReadySeconds:    0
Pod Template:
  Labels:  app=wordpress
           tier=frontend
  Containers:
   wordpress:
    Image:      wordpress:4.8-apache
    Port:       80/TCP
    Host Port:  0/TCP
    Environment:
      WORDPRESS_DB_HOST:      wordpress-mysql
      WORDPRESS_DB_PASSWORD:  &lt;set to the key 'password' in secret 'mysql-pass'&gt;  Optional: false
    Mounts:
      /var/www/html from wordpress-persistent-storage (rw)
  Volumes:
   wordpress-persistent-storage:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  wp-pv-claim
    ReadOnly:   false
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Progressing    True    NewReplicaSetAvailable
  Available      False   MinimumReplicasUnavailable
OldReplicaSets:  &lt;none&gt;
NewReplicaSet:   wordpress-dccb8668f (1/1 replicas created)
Events:
  Type    Reason             Age    From                   Message
  ----    ------             ----   ----                   -------
  Normal  ScalingReplicaSet  7m37s  deployment-controller  Scaled up replica set wordpress-dccb8668f to 1
</code></pre>

<p>I deleted previous deployment and have created the new one because some problems occur while running secrets cli. I do not understand this, why is end point missing?
It also shows that my replica is unavailable,how to fix this? I created deployment with</p>

<pre><code>apply -f ./deployment.yaml
</code></pre>

<p>Pods are running</p>

<pre><code>wordpress-dccb8668f-4j6wg            1/1     Running            29         137m
wordpress-mysql-7d4fc77fdc-fmhdh     1/1     Running            0          141m
</code></pre>

<p>get svc -o wide</p>

<pre><code>wordpress           LoadBalancer   10.102.29.45     &lt;pending&gt;     80:31262/TCP     26h     app=wordpress,tier=frontend
wordpress-mysql     ClusterIP      None             &lt;none&gt;        3306/TCP         26h     app=wordpress,tier=mysql
</code></pre>

<p>EDIT
I changed deployment.yaml as suggested by S.Schenkel</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: wordpress
  labels:
    app: wordpress
spec:
  ports:
    - port: 80
  selector:
    app: wordpress
    tier: frontend
  type: NodePort
</code></pre>

<p>I still have the same problem.</p>

<pre><code>minikube service wordpress --url
http://192.168.99.101:31262
miki@miki:~$ curl http://192.168.99.101:31262
curl: (7) Failed to connect to 192.168.99.101 port 31262: Connection refused
miki@miki:~$ 
</code></pre>

<p>If someone wants to reproduce the example</p>

<blockquote>
  <p><a href="https://github.com/LevelUpEducation/kubernetes-demo/tree/master/Advanced%20Kubernetes%20Usage/Secrets" rel="nofollow noreferrer">https://github.com/LevelUpEducation/kubernetes-demo/tree/master/Advanced%20Kubernetes%20Usage/Secrets</a></p>
</blockquote>

<pre><code>NAME                TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE     SELECTOR
hello-node          LoadBalancer   10.104.141.138   &lt;pending&gt;     8080:31321/TCP   3d3h    app=hello-node
kubernetes          ClusterIP      10.96.0.1        &lt;none&gt;        443/TCP          3d6h    &lt;none&gt;
tomcat-deployment   LoadBalancer   10.107.218.19    &lt;pending&gt;     8080:32688/TCP   2d22h   app=tomcat
wordpress           NodePort       10.102.29.45     &lt;none&gt;        80:31262/TCP     30h     app=wordpress,tier=frontend
wordpress-mysql     ClusterIP      None             &lt;none&gt;        3306/TCP         30h     app=wordpress,tier=mysql
</code></pre>

<p>Pods</p>

<pre><code>wordpress-dccb8668f-gk2hn            0/1     CrashLoopBackOff   27         126m    172.17.0.8    minikube   &lt;none&gt;           &lt;none&gt;
wordpress-mysql-7d4fc77fdc-fmhdh     1/1     Running            1          6h23m   172.17.0.19   minikube   &lt;none&gt;           &lt;none&gt;
</code></pre>

<p>CrashLoopBackOff means what?</p>

<p>I've just reproduced your case within the minikube and was able to reach the wordpress service</p>

<p>Here is step-by-step instruction:</p>

<ol>
<li>Create a secret for MySQL deployment </li>
</ol>

<p><code>kubectl create secret generic mysql-pass --from-literal=password=password</code></p>

<ol start="2">
<li>Deploy <a href="https://github.com/LevelUpEducation/kubernetes-demo/blob/master/Advanced%20Kubernetes%20Usage/Secrets/mysql-deployment.yaml" rel="nofollow noreferrer">MySQL</a> first. </li>
<li>Deploy <a href="https://github.com/LevelUpEducation/kubernetes-demo/blob/master/Advanced%20Kubernetes%20Usage/Secrets/wordpress-deployment.yaml" rel="nofollow noreferrer">wordpress</a> </li>
<li>Edit wordpress service type from <code>type: LoadBalancer</code> to <code>type: NodePort</code></li>
</ol>

<p><code>kubectl edit svc wordpress</code></p>

<ol start="4">
<li>Make sure that all pods are running</li>
</ol>

<p><code>kubectl get pods -o wide</code></p>

<ol start="5">
<li>If no issue with pods, try to curl the service</li>
</ol>

<p><code>curl -v $(minikube service --url wordpress)</code></p>

<p>You should have something like this</p>

<pre><code>sukhoversha@minikube:~$ curl -v $(minikube service --url wordpress)
* Rebuilt URL to: http://192.168.99.100:32144/
*   Trying 192.168.99.100...
* Connected to 192.168.99.100 (192.168.99.100) port 32144 (#0)
&gt; GET / HTTP/1.1
&gt; Host: 192.168.99.100:32144
&gt; User-Agent: curl/7.47.0
&gt; Accept: */*
&gt; 
&lt; HTTP/1.1 302 Found
&lt; Date: Tue, 12 Mar 2019 15:26:23 GMT
&lt; Server: Apache/2.4.10 (Debian)
&lt; X-Powered-By: PHP/5.6.32
&lt; Expires: Wed, 11 Jan 1984 05:00:00 GMT
&lt; Cache-Control: no-cache, must-revalidate, max-age=0
&lt; Location: http://192.168.99.100:32144/wp-admin/install.php
&lt; Content-Length: 0
&lt; Content-Type: text/html; charset=UTF-8
&lt; 
* Connection #0 to host 192.168.99.100 left intact
</code></pre>
