0

I am new to Google cloud services and I am having an issue.

I would like to use Google Kubernetes for my TCP Server which is developed in .Net Core. I created a cluster and a workload with a container.

First problem in kubernetes, Pod errors: CrashLoopBackOff and Does not have minimum availability.

When I check for the logs of the pod. I see; "unable to fetch pod metrics for pod default/game-server-1-68446c9f7f-jfblf: no metrics known for pod"

Actually the server running perfectly and I see the outputs of my server like "Server started and listening to port 4200". Every 5 minutes it keeps crashing.

The Second problem is, I can't connect server from my client altough I allowed 4200 tcp port.

Am I missing something? Could you help me please.

Goli Nikitha
  • 858
  • 3
  • 9

2 Answers2

0

It would help if you include more details of (a) what you're doing; (b) what you experience. Rather than summarize, please include actual commands and actual output.

Your question is very broad and you would benefit from reading Kubernetes documentation and deploying .NET Core apps.

That said, there are no obvious issues with your overall goal of running a .NET Core TCP-based app on Kubernetes (Engine).

It appears that your container has issues. Assuming (!?) it's a Linux container running a .NET Core app, can you run the container locally?

Please include your Deployment and any Service spec.

Because you're using Google Kubernetes Engine (GKE), you have various options for connecting to your app. You can:

DazWilkin
  • 32,823
  • 5
  • 47
  • 88
0

According to my understanding you are trying to run a .NET based application on GKE. In this process you are taking code that you have developed on your machine, turning it into a Docker container image, and then running that image on Google Kubernetes Engine.(source)

For Crashloopbackoff error:

This error happens when Kubernetes does not find var/run/secrets/kubernetes.io/serviceaccount files or if we grant more RBAC privileges. We can resolve this by removing the MountFlags=slave option and restart docker.(source)

Here are some similar crashloopbackoff issues and resolutions.

For no metrics known for pod log:

Metrics Server is expected to report "no metrics known for pod" until cache will be populated. Cache can be empty on freshly deployed metrics-server or can miss values for newly deployed pods and resolves in 60s as default metrics are scraped every 60s.(source)

For client unable to connect to the server:

Try checking if either no one can connect to the server or one user from one location cannot connect to the server.

Here are some troubleshooting steps to be followed for this issue.

Goli Nikitha
  • 858
  • 3
  • 9