Create the Meshed Application

This workshop has been deprecated and archived. The new Amazon EKS Workshop is now available at www.eksworkshop.com.

Create Mesh Object

Configure namespace with App Mesh Labels and deploy Mesh Object

kubectl apply -f deployment/mesh.yaml  

namespace/prodcatalog-ns configured 
mesh.appmesh.k8s.aws/prodcatalog-mesh created

Confirm the Mesh object and Namespace are created

kubectl describe namespace prodcatalog-ns

Name:         prodcatalog-ns
Labels:       appmesh.k8s.aws/sidecarInjectorWebhook=enabled
            gateway=ingress-gw
            mesh=prodcatalog-mesh
Annotations:  Status:  Active
kubectl describe mesh prodcatalog-mesh

Status:
Conditions:
    Last Transition Time:  2020-11-02T16:43:03Z
    Status:                True
    Type:                  MeshActive

Create App Mesh Resources for the services

kubectl apply -f deployment/meshed_app.yaml

virtualnode.appmesh.k8s.aws/prodcatalog created 
virtualservice.appmesh.k8s.aws/prodcatalog created 
virtualservice.appmesh.k8s.aws/proddetail created 
virtualrouter.appmesh.k8s.aws/proddetail-router created 
virtualrouter.appmesh.k8s.aws/prodcatalog-router created 
virtualnode.appmesh.k8s.aws/proddetail-v1 created 
virtualnode.appmesh.k8s.aws/frontend-node created 
virtualservice.appmesh.k8s.aws/frontend-node created 

Get all the Meshed resources for your application services, you should see below response.

kubectl get virtualnode,virtualservice,virtualrouter -n prodcatalog-ns

NAME                                        ARN                                                                                                     AGE
virtualnode.appmesh.k8s.aws/frontend-node   arn:aws:appmesh:us-west-2:$ACCOUNT_ID:mesh/prodcatalog-mesh/virtualNode/frontend-node_prodcatalog-ns   3m4s
virtualnode.appmesh.k8s.aws/prodcatalog     arn:aws:appmesh:us-west-2:$ACCOUNT_ID:mesh/prodcatalog-mesh/virtualNode/prodcatalog_prodcatalog-ns     35m
virtualnode.appmesh.k8s.aws/proddetail-v1   arn:aws:appmesh:us-west-2:$ACCOUNT_ID:mesh/prodcatalog-mesh/virtualNode/proddetail-v1_prodcatalog-ns   35m

NAME                                           ARN                                                                                                                          AGE
virtualservice.appmesh.k8s.aws/frontend-node   arn:aws:appmesh:us-west-2:$ACCOUNT_ID:mesh/prodcatalog-mesh/virtualService/frontend-node.prodcatalog-ns.svc.cluster.local   3m4s
virtualservice.appmesh.k8s.aws/prodcatalog     arn:aws:appmesh:us-west-2:$ACCOUNT_ID:mesh/prodcatalog-mesh/virtualService/prodcatalog.prodcatalog-ns.svc.cluster.local     35m
virtualservice.appmesh.k8s.aws/proddetail      arn:aws:appmesh:us-west-2:$ACCOUNT_ID:mesh/prodcatalog-mesh/virtualService/proddetail.prodcatalog-ns.svc.cluster.local      35m

NAME                                               ARN                                                                                                            AGE
virtualrouter.appmesh.k8s.aws/prodcatalog-router   arn:aws:appmesh:us-west-2:$ACCOUNT_ID:mesh/prodcatalog-mesh/virtualRouter/prodcatalog-router_prodcatalog-ns   35m
virtualrouter.appmesh.k8s.aws/proddetail-router    arn:aws:appmesh:us-west-2:$ACCOUNT_ID:mesh/prodcatalog-mesh/virtualRouter/proddetail-router_prodcatalog-ns    35m

Go to Console and check the App Mesh Resources information

App Mesh virtual nodes virtual services virtual routers