Score:0

Web server does not respond in spite of the fact all K8S indicators are OK

th flag

I have K8S 1.26 cluster on 3 ubuntu VMs, one control plaine and 2 nodes , I apply a deployment as well as a service and forward port 80 to port 80. Issuing the following commands show that everything is OK

enter image description here

enter image description here

However, when I browse to localhost:80, I get nothing always either connection refused or timedout.

Here is the deployment.yml and the service.yml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: stable-deployment
spec:
  replicas: 4
  selector:
    matchLabels:
      app: aspnetcore
      track: stable
  template:
    metadata:
      labels:
        app: aspnetcore
        track: stable
    spec:
      containers:
      - name: stable-app
        image: stable-app
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 80
        readinessProbe:
          httpGet:
            path: /
            port: 80
        resources: {}

kind: Service
apiVersion: v1
metadata:
  name: stable-service
  labels:
    app: aspnetcore
spec:
  type: LoadBalancer
  selector:
    app: aspnetcore
  ports:
    - port: 80
      targetPort: 80

I checked port 80 it is not used by any other apps and it is free, I tried port 8080 instead of 80, it did not help. So what is missing for this to make the web server respond? Thanks for your help

in flag
Browse to the correct interface.
in flag
And please, don't post text that you could just copy&paste as screenshots. You are just making it harder for people to extract information.
Frederik Nielsen avatar
br flag
Do you have a `LoadBalancer` configured in your cluster?
eliassal avatar
th flag
Thanks, what is meant by "Browse to the correct interface"? do you mean port? Should I install LoadBalancer explicitly, if yes how ? I thought maybe mistakenly that it is existing with K8S setup.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.