I have created a headless service, accessing an application thru Kubernetes load balancer. It works after appling yml configurations. However, after 24Hrs, endpoints info is lost.
Cluster information:
Kubernetes version:
Cloud being used: Digital Ocean
$ kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short. Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:“1”, Minor:“25”, GitVersion:“v1.25.3”, GitCommit:“434bfd82814af038ad94d62ebe59b133fcb50506”, GitTreeState:“clean”, BuildDate:“2022-10-12T10:47:25Z”, GoVersion:“go1.19.2”, Compiler:“gc”, Platform:“darwin/arm64”}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:“1”, Minor:“24”, GitVersion:“v1.24.8”, GitCommit:“fdc77503e954d1ee641c0e350481f7528e8d068b”, GitTreeState:“clean”, BuildDate:“2022-11-09T13:31:40Z”, GoVersion:“go1.18.8”, Compiler:“gc”, Platform:“linux/amd64”}
apiVersion: v1
kind: Service
metadata:
name: headless-srv
namespace: staging
annotations:
konghq.com/protocol: “http”
spec:
clusterIP: None
selector:
app: headless-srv
ports:
- name: http
port: 8081
targetPort: 8081
protocol: TCP
kind: Endpoints
apiVersion: v1
metadata:
name: headless-srv
namespace: staging
subsets:
- addresses:
- ip: 68.222.222.222
ports: - port: 8081
name: http
protocol: TCP
- ip: 68.222.222.222
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: headless-srv-ingress
namespace: staging
annotations:
kubernetes.io/tls-acme: “true”
cert-manager.io/cluster-issuer: letsencrypt-prod
plugins.konghq.com: apidocs-rewrite
spec:
ingressClassName: kong
tls:
- secretName: headless.srv.neelam.one
hosts:
- headless.srv.neelam.one
rules:
- host: headless.srv.neelam.one
http:
paths:
- backend:
service:
name: headless-srv
port:
number: 8081
path: /
pathType: ImplementationSpecific