Create the Meshed Application

Using the YAML we just reviewed, apply the meshed application resources with kubectl.

kubectl apply -f 2_meshed_application/meshed_app.yaml

namespace/prod configured created created created created created created created created
service/jazz created
service/metal created
namespace/prod configured

This creates the Kubernetes objects, and the App Mesh controller in turn creates resources within AWS App Mesh for you.

You can see that your mesh object was created using kubectl.

kubectl get meshes

NAME     ARN                                                  AGE
dj-app   arn:aws:appmesh:us-west-2:1234567890:mesh/dj-app   119s

You can also see that the mesh was created in App Mesh using the aws CLI.

aws appmesh list-meshes

   "meshes" : [
         "arn" : "arn:aws:appmesh:us-west-2:1234567890:mesh/dj-app",
         "meshName" : "dj-app",
         "version" : 1,
         "meshOwner" : "1234567890",
         "createdAt" : "2020-06-18T10:01:21.411000-04:00",
         "resourceOwner" : "1234567890",
         "lastUpdatedAt" : "2020-06-18T10:01:21.411000-04:00"

Examine the objects within the prod namespace and you will see your App Mesh resources along with your native Kubernetes objects.

 kubectl get all -n prod

NAME                            READY   STATUS    RESTARTS   AGE
pod/dj-6bf5fb7f45-qkhv7         1/1     Running   0          18m
pod/jazz-v1-6f688dcbf9-djb9h    1/1     Running   0          18m
pod/metal-v1-566756fbd6-8k2rs   1/1     Running   0          18m

NAME               TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
service/dj         ClusterIP     <none>        9080/TCP   18m
service/jazz       ClusterIP   <none>        9080/TCP   17s
service/jazz-v1    ClusterIP   <none>        9080/TCP   18m
service/metal      ClusterIP   <none>        9080/TCP   17s
service/metal-v1   ClusterIP   <none>        9080/TCP   18m

NAME                       READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/dj         1/1     1            1           18m
deployment.apps/jazz-v1    1/1     1            1           18m
deployment.apps/metal-v1   1/1     1            1           18m

NAME                                  DESIRED   CURRENT   READY   AGE
replicaset.apps/dj-6bf5fb7f45         1         1         1       18m
replicaset.apps/jazz-v1-6f688dcbf9    1         1         1       18m
replicaset.apps/metal-v1-566756fbd6   1         1         1       18m

NAME                                   ARN                                                                            AGE         arn:aws:appmesh:us-west-2:1234567890:mesh/dj-app/virtualNode/dj_prod         19s    arn:aws:appmesh:us-west-2:1234567890:mesh/dj-app/virtualNode/jazz-v1_prod    17s   arn:aws:appmesh:us-west-2:1234567890:mesh/dj-app/virtualNode/metal-v1_prod   17s

NAME                                   ARN                                                                                              AGE    arn:aws:appmesh:us-west-2:1234567890:mesh/dj-app/virtualService/    19s   arn:aws:appmesh:us-west-2:1234567890:mesh/dj-app/virtualService/   18s

NAME                                         ARN                                                                                  AGE    arn:aws:appmesh:us-west-2:1234567890:mesh/dj-app/virtualRouter/jazz-router_prod    19s   arn:aws:appmesh:us-west-2:1234567890:mesh/dj-app/virtualRouter/metal-router_prod   19s