Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 2. Setting up a sidecar container

download PDF

You can set up a sidecar container when you create a Cryostat instance with an installed Red Hat build of Cryostat Operator on the Red Hat OpenShift web console.

Additionally, you can set up a sidecar container by modifying an existing Cryostat resource on Red Hat OpenShift. This action instructs the Red Hat build of Cryostat Operator to modify the existing Cryostat installation on Red Hat OpenShift.

Prerequisites

Procedure

  1. From the Red Hat OpenShift web console, go to Operators > Installed Operators.
  2. From the list of installed operators, click the name of your Red Hat build of Cryostat Operator instance. An Operator details page opens on your web console.
  3. In the Provided APIs section, click Create instance.
  4. Complete any mandatory fields, which are marked with an asterisk, such as the Name field.
  5. From the Create Cryostat configuration page, go to the Report Options section.
  6. To show options for configuring the Cryostat’s automated report analysis implementation, click the expand icon.

    Figure 2.1. The Report Options section on the Create Cryostat configuration page

    The *Report Options* section on the *Create Cryostat* configuration page}
  7. Configure any of the following report options to meet your needs:

    1. Replicas: Defaults to 0, which indicates that the main Cryostat container handles report generation. You must set to a value greater than 0, so that a replica or replicas of your sidecar container can generate and handle analysis reports.
    2. Resources: Sets the resource limits for each sidecar replica. To show configurable limits and request options for each sidecar replica, click the expand icon. Options include CPU cores, Memory, and Storage. The Storage option has the least relevance to the generation of a sidecar report. Red Hat OpenShift sets the supported units for each option.
    3. Sub Process Max Heap Size: Option applies only to the main Cryostat container. Allocates the maximum amount of memory for the main Cryostat container that it can use to generate reports.

      Note

      The following limitations might exist with the type of value you specify for the Sub Process Max Heap Size option:

      • A low value might cause report-generation requests to fail, because the report size might exceed the allocated memory for the main Cryostat container. Additionally, report generation might time out, because the JVM must constantly run garbage collection (GC) operations to process the report.
      • A high value might deplete memory resources for the Cryostat instance that operates inside the main Cryostat container, because the memory limitation applies to two memory partitions until the report-generation operation finishes.

      Consider generating a report with the option’s default setting. If the default setting does not match your requirements and then consider configuring the option.

  8. To generate a Cryostat instance, click Create.

Verification

  1. Go to your Cryostat instance’s Cryostat details page and then select the Details tab.
  2. Click the URL that is available under the Application URL field. Your web browser redirects you to a OpenShift Container Platform login page, where you must enter your credentials.
  3. From the Cryostat web console, select your target JVM.
  4. Go to the Recordings menu item and start a JFR recording of your Java Virtual Machine (JVM).
  5. On the Active Recordings tab or the Archived Recordings tab, view automated analysis information for the sidecar by expanding the twistie icon (v) next to your listed recording:

    Figure 2.2. Example of viewing automated analysis information for a sidecar recording

    Example of viewing automated analysis information for a sidecar recording
  6. Go to your Red Hat OpenShift web console and select Workloads > Pods.
  7. Click the name of your pod.
  8. From the Pod details page, click the Logs tab.
  9. To stop the log stream, click the pause icon. A series of log messages opens in the log window.

    Figure 2.3. The Log streaming button on the Pod details page

    The *Log streaming* button on the *Pod details* page
  10. Locate any log messages that confirm that the sidecar report container received the generated report requests from the main Cryostat container.

    Figure 2.4. Example of log messages in the Logs tab

    Example of log messages in the *Logs* tab

Additional resources

Revised on 2023-12-12 18:43:02 UTC

Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.