Deploy custom application into the mesh
After you have one or more clusters attached to the mesh, here are some best practices to deploy applications on multiple clusters.
Deploy demo application
If you just want to get started with any demo application in a multi-cluster mesh, the easiest is to install the built-in Service Mesh Manager demo application.
-
You can deploy the demo application from a command line.
-
The following command deploys every service of the demo application to the primary Calisti cluster.
smm demoapp install
-
To deploy the demo application in a distributed way to multiple clusters, run:
smm demoapp install -s frontpage,catalog,bookings smm -c <PEER_CLUSTER_KUBECONFIG_FILE> demoapp install -s movies,payments,notifications,analytics,database --peer
After installation, the demo application automatically starts generating traffic, and the dashboard shows you the data flow. (If it doesn’t, run the
smm demoapp load start
command, or Generate load on the UI. If you want to stop generating traffic, runsmm demoapp load stop
.) -
-
Open the dashboard and look around.
smm dashboard
Deploy custom application
Here is how you can deploy your own application into the service mesh with Service Mesh Manager. The procedure covers both single-cluster and multi-cluster meshes.
-
Create the namespace where you would like to run your applications on every cluster. The examples use the
test
namespace:kubectl create ns test
-
In the cluster where Service Mesh Manager is installed, enable sidecar injection in that namespace. This places an
istio.io/rev
label and sets it to the appropriate Istio control plane. Use one of the following methods to enable sidecar injection:-
Use the Service Mesh Manager CLI tool:
smm sidecar-proxy auto-inject on test
If there are multiple control planes, use the
--controlplane <name-of-the-controlplane>
flag to specify which one to use. Typically that’s the one your other applications use, or the newer one if you are testing application deployment after a Calisti update that included a new Istio control plane. -
Use kubectl:
kubectl label ns test istio.io/rev=cp-v115x.istio-system
-
Using GitOps methods: See Restart Demo applications for an example.
In a multi-cluster mesh, Service Mesh Manager adds the same label to this namespace on all other clusters. (If not, check the istio-operator pod logs on the particular cluster for any potential issues.)
-
-
Deploy your application on the clusters as you would usually do.
In a multi-cluster mesh make sure to deploy all Kubernetes
service
resources on all clusters attached to the mesh, even if pods are only present on a subset of the clusters. This is needed for Istio to do proper routing across clusters.For an example on how to deploy the Calisti demo application using GitOps methods, see the Service Mesh Manager GitOps installation guides. - Single-cluster scenario - Multi-cluster mesh scenario
-
Make sure that sidecar pods are indeed injected to your application pods.
If not, check the official Istio documentation for potential issues.
-
Send traffic to your applications, then open the dashboard and look around.
smm dashboard