I have an ingress for my application:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: myapi-ingress
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
ingressClassName: nginx
rules:
- host: mysite.com
http:
paths:
- path: "/posts"
pathType: Prefix
backend:
service:
name: myservice
port:
number: 80
When I run kubectl describe ing myapi-ingress
, I can see that the ingress is stuck in sync state:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Sync 26m (x2 over 27m) nginx-ingress-controller Scheduled for sync
PS. Before this happens, I tried to install another ingress for internal usage under another namespace and ingressclassname.
I'm getting 404 when I try to hit this endpoint. Nothing in the logs.
What is the problem?
CodePudding user response:
The problem was the host name set on the Ingress