- 최신
- 최다 투표
- 가장 많은 댓글
Currently all virtual service names need to be resolvable by DNS. The value of the A record does not need to point to a real place, just a non-loopback IP address. See Unable to resolve DNS name for a virtual service in the App Mesh Documentation for more details.
Hi, we ran into the same error for creating a virtual service(that had no matching DNS record) in our EKS cluster and instead of creating a record in Route53, we created a k8s service that points at nothing(giving us a DNS record inside of k8s). Once that fake k8s service DNS resolves, envoy can take over with what virtual node to route to based on the App mesh config you have set.
Here is our example we have in our setup(renamed to colorteller):
users hit http://colorteller.default:8400/${routeInVirtualRouter}
---
# This Service creates a DNS entry that the below VirtualService requires
apiVersion: v1
kind: Service
metadata:
name: colorteller
namespace: default
spec:
ports:
- protocol: TCP
port: 8400
targetPort: 8400
---
apiVersion: appmesh.k8s.aws/v1beta2
kind: VirtualService
metadata:
name: colorteller
namespace: default
spec:
awsName: colorteller.default
provider:
virtualRouter:
virtualRouterRef:
name: colorteller
---
apiVersion: appmesh.k8s.aws/v1beta2
kind: VirtualRouter
metadata:
name: colorteller
namespace: default
spec:
listeners:
- portMapping:
port: 8400
protocol: http
routes:
...