<p>I'm trying to get <code>online-auction-scala</code> running on GCP. The only thing I miss now is getting <code>ingress</code> working. The health check from <code>search</code> service reports <code>UNHEALTHY</code> status, although <code>search</code> service is up and running and there are no errors in it's logs.</p>

<p>The steps I do after building docker images and publishing them to docker registry:</p>

<pre><code>gcloud container clusters create mt-develop
gcloud container clusters get-credentials mt-develop
kubectl create serviceaccount tiller --namespace kube-system
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
helm install lightbend-helm-charts/reactive-sandbox --name reactive-sandbox
PRIMARY_ACCOUNT=$(gcloud info --format='value(config.account)')
kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=$PRIMARY_ACCOUNT
kubectl apply -f RBAC.yml
</code></pre>

<p>when the <code>reactive-sandbox</code> is ready, I'm running the script from <code>KUBERNATES.md</code> file.</p>

<pre><code>#
# NOTE: You must change the secret values below or the applications will crash.
#
# These values are used for Play's application secret. It is important that they are set to a secret value.
# More information: https://www.playframework.com/documentation/latest/ApplicationSecret

secret_bidding=Secret123
secret_item=Secret123
secret_user=Secret123
secret_search=Secret123
secret_web=Secret123

# Configure Play's Allowed Hosts filter.
# More information: https://www.playframework.com/documentation/latest/AllowedHostsFilter

allowed_host=.

# Default addresses for reactive-sandbox, which provides Cassandra, Kafka, Elasticsearch

export service_cassandra=_cql._tcp.reactive-sandbox-cassandra.default.svc.cluster.local
export service_kafka=_broker._tcp.reactive-sandbox-kafka.default.svc.cluster.local
export service_elasticsearch=_http._tcp.reactive-sandbox-elasticsearch.default.svc.cluster.local

# Deploy bidding-impl

rp generate-kubernetes-resources registry.mydomain.com/trg/biddingimpl:1.0.0-SNAPSHOT \
  --generate-pod-controllers --generate-services --service-type="NodePort" \
  --env JAVA_OPTS="-Dplay.http.secret.key=$secret_bidding -Dplay.filters.hosts.allowed.0=$allowed_host" \
  --pod-controller-replicas 2 \
  --external-service "cas_native=$service_cassandra" \
  --external-service "kafka_native=$service_kafka" | kubectl apply -f -

# Deploy item-impl

rp generate-kubernetes-resources registry.mydomain.com/trg/itemimpl:1.0.0-SNAPSHOT \
  --generate-pod-controllers --generate-services --service-type="NodePort" \
  --env JAVA_OPTS="-Dplay.http.secret.key=$secret_item -Dplay.filters.hosts.allowed.0=$allowed_host" \
  --pod-controller-replicas 2 \
  --external-service "cas_native=$service_cassandra" \
  --external-service "kafka_native=$service_kafka" | kubectl apply -f -

# Deploy user-impl

rp generate-kubernetes-resources registry.mydomain.com/trg/userimpl:1.0.0-SNAPSHOT \
  --generate-pod-controllers --generate-services --service-type="NodePort" \
  --env JAVA_OPTS="-Dplay.http.secret.key=$secret_user -Dplay.filters.hosts.allowed.0=$allowed_host" \
  --pod-controller-replicas 2 \
  --external-service "cas_native=$service_cassandra" \
  --external-service "kafka_native=$service_kafka" | kubectl apply -f -

# Deploy search-impl

rp generate-kubernetes-resources registry.mydomain.com/trg/searchimpl:1.0.0-SNAPSHOT \
  --generate-pod-controllers --generate-services --service-type="NodePort" \
  --env JAVA_OPTS="-Dplay.http.secret.key=$secret_search -Dplay.filters.hosts.allowed.0=$allowed_host" \
  --pod-controller-replicas 2 \
  --external-service "cas_native=$service_cassandra" \
  --external-service "kafka_native=$service_kafka" \
  --external-service "elastic-search=$service_elasticsearch" | kubectl apply -f -

# Deploy webgateway

rp generate-kubernetes-resources registry.mydomain.com/trg/webgateway:1.0.0-SNAPSHOT \
  --service-type="NodePort" \
  --generate-pod-controllers --generate-services \
  --env JAVA_OPTS="-Dplay.http.secret.key=$secret_web -Dplay.filters.hosts.allowed.0=$allowed_host" | kubectl apply -f -

# Deploy ingress for everything

# Note that some environments, such as IBM Cloud and Google Kubernetes Engine have slightly different nginx
# implementations. For these, you may need to specify `--ingress-path-suffix '*'` or `--ingress-path-suffix '.*'` as
# part of the command below.

rp generate-kubernetes-resources \
  --generate-ingress --ingress-name online-auction \
  registry.mydomain.com/trg/webgateway:1.0.0-SNAPSHOT \
  registry.mydomain.com/trg/searchimpl:1.0.0-SNAPSHOT \
  registry.mydomain.com/trg/userimpl:1.0.0-SNAPSHOT \
  registry.mydomain.com/trg/itemimpl:1.0.0-SNAPSHOT \
  registry.mydomain.com/trg/biddingimpl:1.0.0-SNAPSHOT | kubectl apply -f -
</code></pre>

<p>Any help would be much appreciated.</p>

Alex
<p>Thanks Patrick, I figured out why ingress was showing a not healthy state. It was because it tried to get it from / path and in that service, it was returning  404 status code. I had to implement that to return 200 on that path and that solved the issue.</p>
