Google Kubernetes Engine denying traffic

9/7/2018

I have a google Kubernetes Engine running. I made an ASP.NET core MVC application that is deployed as a service on the engine and I would like to be able to make an HTTP request (GET http:serviceendpointip/controller/action) to this service from a different application. I tested my MVC application using ngrok (provides a public url to my application) and the request worked successfully.

So my application seems to be working fine. However, when I deploy it as an exposed public service to the Kubernetes engine, the request is not working and I am assuming that the engine is somehow blocking this network traffic... I am able to view the application's homepage on http://serviceendpointip/home from a web browser. What could be causing my HTTP request to be failing?

Running kubectl describe deployment telebot-pianomoves-v1-km:

Namespace:              default
CreationTimestamp:      Tue, 28 Aug 2018 21:34:03 +1000
Labels:                 run=telebot-pianomoves-v1-km
Annotations:            deployment.kubernetes.io/revision=12
                        kubernetes.io/change-cause=kubectl set image 
deployment/telebot-pianomoves-v1-km telebot-pianomoves-v1- 
km=gcr.io/telebot-pianomoves-v1/tel
ebot-pianomoves-v1-km:20180907t124111 --record=true --kubeconf...
Selector:               run=telebot-pianomoves-v1-km
Replicas:               3 desired | 2 updated | 4 total | 1 available | 3 
unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  1 max unavailable, 1 max surge
Pod Template:
  Labels:  run=telebot-pianomoves-v1-km
  Containers:
   telebot-pianomoves-v1-km:
    Image:        gcr.io/telebot-pianomoves-v1/telebot-pianomoves-v1- 
   km:20180907t124111
    Port:         8080/TCP
    Environment:  <none>
    Mounts:       <none>
  Volumes:        <none>
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Available      False   MinimumReplicasUnavailable
OldReplicaSets:  telebot-pianomoves-v1-km-7775cfb674 (1/1 replicas 
created), telebot-pianomoves-v1-km-cf4f5d9d8 (1/1 replicas created)
NewReplicaSet:   telebot-pianomoves-v1-km-7b78d6597d (2/2 replicas 
created)
Events:          <none>

Running kubectl get deployments:

telebot-pianomoves-v1-km 3 4 2 1 9d

Thanks

-- Harry Stuart
asp.net-core-mvc
google-cloud-platform
google-kubernetes-engine
http
kubernetes

1 Answer

9/7/2018

I have managed to fix my issue. I did so by publishing to Kubernetes Engine from Visual Studio and making sure I set the number of replicas to 1.

-- Harry Stuart
Source: StackOverflow