<p>I have a problem with my ingress and my service, I can not get that when I connect to the IP of my server, I redirect to the service I have associated with port 80, which is my website. I pass you the configuration files and the description of the ingress:</p>

<pre><code>apiVersion: v1
kind: Namespace
metadata:
  name: bookstack
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    service: mysql
  name: mysql
  namespace: bookstack
spec:
  replicas: 1
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        service: mysql
    spec:
      containers:
      - env:
        - name: MYSQL_DATABASE
          value: bookstack
        - name: MYSQL_PASS
          value: pass
        - name: MYSQL_ROOT_PASSWORD
          value: root
        - name: MYSQL_USER
          value: user
        image: mysql:5.7
        name: mysql
        ports:
        - containerPort: 3306
      restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
  labels:
    service: mysql
  name: mysql
  namespace: bookstack
spec:
  type: NodePort
  ports:
  - name: "3306"
    port: 3306
    targetPort: 3306
  selector:
    service: mysql
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    app: bookstack
  name: bookstack
  namespace: bookstack
spec:
  replicas: 1
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: bookstack
    spec:
      containers:
      - env:
        - name: namespace
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: podname
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: nodename
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        - name: DB_DATABASE
          value: bookstack
        - name: DB_HOST
          value: mysql
        - name: DB_PASSWORD
          value: root
        - name: DB_USERNAME
          value: root
        image: solidnerd/bookstack:latest
        name: bookstack
        ports:
        - name: http
          containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: bookstack
  name: bookstack
  namespace: bookstack
spec:
  type: NodePort
  ports:
  - name: http-port
    port: 80
    protocol: TCP
  selector:
    app: bookstack
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: http
  namespace: bookstack
spec:
  backend:
    serviceName: bookstack
    servicePort: http-port
</code></pre>

<p>This is what appears on my ingress:</p>

<pre><code>Name:             http
Namespace:        bookstack
Address:
Default backend:  bookstack:http-port (10.36.0.22:80)
Rules:
  Host  Path  Backends
  ----  ----  --------
  *     *     bookstack:http-port (10.36.0.22:80)
Annotations:
  kubectl.kubernetes.io/last-applied-configuration:  {"apiVersion":"extensions/v1beta1","kind":"Ingress","metadata":{"annotations":{},"name":"http","namespace":"bookstack"},"spec":{"backend":{"serviceName":"bookstack","servicePort":"http-port"}}}

Events:  &lt;none&gt;
</code></pre>

<p>It doesn't return any external IP to connect me, why could it be? I want to avoid using LoadBalancer as a service type.</p>

<p>The main problem was that I didn't have activated the balancer that Google Kubernetes Engine offers by default, not having it active I couldn't generate an external ip because there wasn't a balancer. There are two solutions, either activate GKE's default load balancer or create a type of service: LoadBalancer.</p>

<p>Important to activate also within the deploy the readinessProbe
and livenessProbe.</p>

<p>An example:</p>

<pre><code>    readinessProbe:
      httpGet:
        path: /login
        port: 80
      initialDelaySeconds: 5
      timeoutSeconds: 1
      periodSeconds: 15
    livenessProbe:
      httpGet:
        path: /login
        port: 80
      initialDelaySeconds: 15
      timeoutSeconds: 1
      periodSeconds: 15
</code></pre>
