Error updating Endpoint Slices for Service Node Not Found

筅森魡賤 提交于 2020-08-10 20:11:29

问题


I tried setting up gitea in my local kubernetes cluster. At first it was working I can access the gitea home page. But when I tried to reboot my raspberry pi. I got the below error on my Service

My pod is ok.

I'm wondering why I only got this error every time i reboot my device.

here are my configuraiton

kind: Service
apiVersion: v1
metadata:
  name: gitea-service
spec:
  type: NodePort
  selector:
    app: gitea
  ports:
  - name: gitea-http
    port: 3000
    targetPort: 3000
    nodePort: 30000
  - name: gitea-ssh
    port: 22
    targetPort: 22
    nodePort: 30002
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: gitea-deployment
  labels:
    app: gitea
spec:
  replicas: 1
  serviceName: gitea-service-headless
  selector:
    matchLabels:
      app: gitea
  template:
    metadata:
      labels:
        app: gitea
    spec:
      containers:
      - name: gitea
        image: gitea/gitea:1.12.2
        ports:
        - containerPort: 3000
          name: gitea
        - containerPort: 22
          name: git-ssh
        volumeMounts:
        - name: pv-data
          mountPath: /data
      volumes:
      - name: pv-data
        persistentVolumeClaim:
            claimName: gitea-pvc
apiVersion: v1
kind: Service
metadata:
  name: gitea-service-headless
  labels:
    app: gitea-service-headless
spec:
  clusterIP: None
  ports:
  - port: 3000
    name: gitea-http
    targetPort: 3000
  - port: 22
    name: gitea-https
    targetPort: 22    
  selector:
    app: gitea

回答1:


I'm wondering why I only got this error every time i reboot my device.

Well, lets look at the error:

Error updating Endpoint Slices for Service dev-ops/gitea-service: node "rpi4-a" not found

It look like the error was triggered because: node "rpi4-a" not found. Why is it not found?? While rebooting, the node is down, pod is not working for a moment and this is when service throws the error. When the node boots up, pod starts working but the events are present for one hour (by default) before they get automatically deleted.

So don't worry about it. You rebooted the node so you should expect some errors to appear. Kubernetes tries as hard as it can to keep everything working, so when you trigger the reboot without draining the node, some errors may appear.



来源:https://stackoverflow.com/questions/63300718/error-updating-endpoint-slices-for-service-node-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!