0

I have many services running in EKS with type: Loadbalancer. I'm trying to deploy another but the healthcheck keeps failing, so the LB does not forward any traffic because it thinks all the instances are unhealthy. I've included the yaml file I'm using to deploy it (kubectl apply -f someyamlfile.yaml). The healthcheck is trying to ping the node port, something like 30700. This is the same type of generated port the others are using for the healthcheck. I'm not sure whats going on here and could use some troubleshooting guidence.

Here is the yaml file I'm using although I don't think the issue is here, I think its something to do with the cluster.

apiVersion: apps/v1
kind: ReplicaSet
metadata:
  name: app-scripting
  labels:
    app: appscripting
spec:
  selector:
    matchLabels:
      app: appscripting
  replicas: 1
  template:
    metadata:
      labels:
        app: appscripting
    spec:
      terminationGracePeriodSeconds: 10
      containers:
      - name: app-scripting
        image: 000000000000000.ddd.ecr.us-west-2.amazonaws.com/appscripting
        resources:
          requests:
            cpu: 250m
            memory: 250Mi  
        ports:
        - containerPort: 80

---

apiVersion: v1
kind: Service
metadata:
  name: app-scripting
spec:
  selector:
    app: appscripting
  type: LoadBalancer
  ports:
  - name: appscriptinghttps
    protocol: TCP
    port: 443
    targetPort: 443
  - name: appscriptinghttp
    protocol: TCP
    port: 80
    targetPort: 80
1
  • So I was able to figure this out. Turns out the healthcheck is actually telling me the container is not healthy. I was dead-set on the thought I have the config correct. Turns out I have a bad .htaccess file.
    – brooksly
    Oct 29 '21 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.