AWS App Mesh Controller For K8s is a controller to help manage App Mesh resources for a Kubernetes cluster. The controller watches custom resources for changes and reflects those changes into the App Mesh API. It is accompanied by the deployment of three custom resource definitions (CRDs): meshes, virtualnodes, and virtualservices. These map to App Mesh API objects which the controller manages for you.
- Install using steps under install.md
- Follow the walkthroughs under aws-app-mesh-examples, e.g. howto-k8s-fargate, howto-k8s-retry-policy.
First, create a Mesh resource, which will trigger the controller to create a Mesh via the App Mesh API. Then, define VirtualServices for each application that you want to route traffic to, and finally create VirtualNodes for each Deployment that will make up that Application.
apiVersion: appmesh.k8s.aws/v1beta1
kind: Mesh
metadata:
name: my-mesh
apiVersion: appmesh.k8s.aws/v1beta1
kind: VirtualNode
metadata:
name: my-app-a
namespace: prod
spec:
meshName: my-mesh
listeners:
- portMapping:
port: 9080
protocol: http
serviceDiscovery:
dns:
hostName: my-app-a.prod.svc.cluster.local
backends:
- virtualService:
virtualServiceName: my-svc-a
apiVersion: appmesh.k8s.aws/v1beta1
kind: VirtualService
metadata:
name: my-svc-a
namespace: prod
spec:
meshName: my-mesh
virtualRouter:
name: my-svc-a-router
listeners:
- portMapping:
port: 9080
protocol: http
routes:
- name: route-to-svc-a
http:
match:
prefix: /
action:
weightedTargets:
- virtualNodeName:
weight: 1
If you think you’ve found a potential security issue, please do not post it in the Issues. Instead, please follow the instructions here or email AWS security directly.
Please read our troubleshooting guide.
Contributions welcome! Please read our guidelines and Code of Conduct.
This library is licensed under the Apache 2.0 License.