I am new to aws.
I am tryin to deploy my application to aws eks, everything is created well, except for my caddy server service, it stuck at pending status when it tries to get external-ip.
When I describe the service this is the output:
Name: caddy
Namespace: default
Labels: app=caddy
Annotations: service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: instance
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
service.beta.kubernetes.io/aws-load-balancer-type: external
Selector: app=caddy
Type: LoadBalancer
IP Family Policy: SingleStack
IP Families: IPv4
IP: 10.100.4.149
IPs: 10.100.4.149
Port: http 80/TCP
TargetPort: 80/TCP
NodePort: http 31064/TCP
Endpoints: 192.168.26.17:80
Port: https 443/TCP
TargetPort: 443/TCP
NodePort: https 30707/TCP
Endpoints: 192.168.26.17:443
Session Affinity: None
External Traffic Policy: Cluster
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal EnsuringLoadBalancer 16m service-controller Ensuring load balancer
Warning FailedBuildModel 15m service Failed build model due to WebIdentityErr: failed to retrieve credentials
caused by: InvalidIdentityToken: Incorrect token audience
status code: 400, request id: dd76289e-ca16-48e5-8985-3a4fc1b64f43
Warning FailedBuildModel 7m49s service Failed build model due to WebIdentityErr: failed to retrieve credentials
caused by: InvalidIdentityToken: Incorrect token audience
status code: 400, request id: 62ed516f-c505-4bc8-979f-74edc449217e
I discovered that the problem was coming from the serviceAccount I have created, there was a a typo in the OIDC provider URI.