This topic describes how to install Application Live View Sidecar.

Sidecar - Component that is started alongside a single application (inside the same pod) running on Kubernetes cluster. It is responsible for registering the application with the Application Live View Server.

To deploy Sidecar along with the application,follow the steps below:

Deploy Sidecar along with Application

  1. Create a deployment yaml (app-sidecar-deployment.yaml) as shown below:

    app-sidecar-deployment.yaml

        apiVersion: extensions/v1beta1
        kind: Deployment
        metadata:
          labels:
            app: example-app-service
          name: example-app-service
        spec:
          replicas: 1
          selector:
            matchLabels:
              app: example-app-service
          template:
            metadata:
              labels:
                app: example-app-service
            spec:
              containers:
              ### Get the latest image of sidecar
              - image: registry.pivotal.io/app-live-view/application-live-view-sidecar:0.1.0
                name: app-live-view-sidecar
                env:
                # application name used to register sidecar with application instance
                - name: app.live.view.sidecar.application-name
                  value: example-app-service
                # hostname on which the application is running for sidecar to register
                - name: app.live.view.sidecar.application-host
                  value: "localhost" # since both sidecar and app reside in same pod, they can communicate via localhost
                # port on which the application is running
                - name: app.live.view.sidecar.application-port
                  #value: "8080"
                  value: "{{TO BE CHANGED}}"
                # name of the app live view service that is exposed on port 7000 so that sidecar can communicate with app live view
                - name: app.live.view.client.host
                  value: app-live-view-7000
                # port for sidecar to communicate with the app live view via rsocket (always 7000)
                - name: app.live.view.client.port
                  value: "7000"
              ### Get the application image 
              - image: {{TO BE CHANGED}}
                name: example-app-service
                ports:
                #- containerPort: 8080
                - containerPort: {{TO BE CHANGED}}
    

    Note: Replace {{TO BE CHANGED}} placeholder with your application image

  2. Deploy the application using kubectl CLI. Run:

    kubectl apply -f app-sidecar-deployment.yaml
    

    The above deployment creates two containers: Application container and the Sidecar container. The Sidecar connects to the Application Live View Server via service (app-live-view-7000) that is exposed on port 7000

  3. Verify the service by running the below command:

    kubectl get pods
    

    The application pod should be in running state


Sidecar Configuration Properties

Exclusive list of labels available for Sidecar are listed below:

Label Name Mandatory Type Default Significance
app.live.view.sidecar.application-name true String None application name used to register sidecar with application instance
app.live.view.sidecar.application-host true String localhost hostname on which the application is running for sidecar to register
app.live.view.sidecar.application-port true Integer 8080 port on which the application is running
app.live.view.client.host true String localhost name of the app live view service that is exposed on port 7000 so that sidecar can communicate with app live view
app.live.view.client.port true Integer 7070 port for sidecar to communicate with the app live view via rsocket (always 7000)
app.live.view.sidecar.application-protocol false http / https http protocol scheme
app.live.view.sidecar.application-path false String None application port
app.live.view.sidecar.application-actuator-path false /actuator 8080 actuator context path
app.live.view.sidecar.application-actuator-port false Integer 8080 application actuator port
app.live.view.sidecar.application-actuator-health-port false Integer None application health port
app.live.view.sidecar.application-actuator-appFlavours false comma separated string spring-boot application flavours
app.live.view.sidecar.application-actuator-instance-id false String None application instance id
app.live.view.application.self-signed false boolean false Enable self signed certificate verification for application
app.live.view.application.trust-store-path false String None Trust store path which contains certificates
app.live.view.application.trust-store-password false String None Trust store password
app.live.view.application.trust-store-type false String None Trust store type
app.live.view.sidecar.refresh false Integer 20 Duration between refreshes where health data is synced between app and app live view


Access Application Live View UI

Now, you should be able to see the Application on the Application Live View UI at 
http://<dns name from EXTERNAL-IP column in kubectl get svc output>:5112
check-circle-line exclamation-circle-line close-line
Scroll to top icon