<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Deploy Pyroscope on Kubernetes on Grafana Labs</title><link>https://grafana.com/docs/pyroscope/v1.18.x/deploy-kubernetes/</link><description>Recent content in Deploy Pyroscope on Kubernetes on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/pyroscope/v1.18.x/deploy-kubernetes/index.xml" rel="self" type="application/rss+xml"/><item><title>Deploy Pyroscope using the Helm chart</title><link>https://grafana.com/docs/pyroscope/v1.18.x/deploy-kubernetes/helm/</link><pubDate>Wed, 08 Apr 2026 14:38:28 +0000</pubDate><guid>https://grafana.com/docs/pyroscope/v1.18.x/deploy-kubernetes/helm/</guid><content><![CDATA[&lt;h1 id=&#34;deploy-pyroscope-using-the-helm-chart&#34;&gt;Deploy Pyroscope using the Helm chart&lt;/h1&gt;
&lt;p&gt;The &lt;a href=&#34;https://helm.sh/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Helm&lt;/a&gt; chart allows you to configure, install, and upgrade Pyroscope within a Kubernetes cluster.&lt;/p&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;These instructions are common across any flavor of Kubernetes and assume that you know how to install, configure, and operate a Kubernetes cluster as well as use &lt;code&gt;kubectl&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Hardware requirements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A single Kubernetes node with a minimum of 4 cores and 16GiB RAM&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Software requirements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Kubernetes 1.20 or higher&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;kubectl&lt;/code&gt; command for your version of Kubernetes&lt;/li&gt;
&lt;li&gt;Helm 3 or higher&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Verify that you have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Access to the Kubernetes cluster&lt;/li&gt;
&lt;li&gt;Persistent storage is enabled in the Kubernetes cluster, which has a default storage class set up. You can &lt;a href=&#34;https://kubernetes.io/docs/tasks/administer-cluster/change-default-storage-class/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;change the default StorageClass&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;DNS service works in the Kubernetes cluster&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;install-the-helm-chart-in-a-custom-namespace&#34;&gt;Install the Helm chart in a custom namespace&lt;/h2&gt;
&lt;p&gt;Use a custom namespace so that you don&amp;rsquo;t have to overwrite the default namespace later in the procedure.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a unique Kubernetes namespace, for example &lt;code&gt;pyroscope-test&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;console&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-console&#34;&gt;kubectl create namespace pyroscope-test&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For more details, see the Kubernetes documentation about &lt;a href=&#34;https://kubernetes.io/docs/tasks/administer-cluster/namespaces/#creating-a-new-namespace&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Creating a new namespace&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set up a Helm repository using the following commands:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;console&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-console&#34;&gt;helm repo add grafana https://grafana.github.io/helm-charts
helm repo update&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The Helm chart at &lt;a href=&#34;https://grafana.github.io/helm-charts&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://grafana.github.io/helm-charts&lt;/a&gt; is a publication of the source code at &lt;a href=&#34;https://github.com/grafana/pyroscope/tree/main/operations/pyroscope/helm/pyroscope&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;strong&gt;grafana/pyroscope&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install Pyroscope using the Helm chart using one of the following options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Option A: Install Pyroscope as single binary. Use this mode &lt;em&gt;only when you need one Pyroscope instance&lt;/em&gt;. Multiple instances won&amp;rsquo;t share information with each other.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;helm -n pyroscope-test install pyroscope grafana/pyroscope&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The output of the command contains the query URLs necessary for the following steps, so for a single-binary setup, it will look like this:&lt;/p&gt;
&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
 &lt;span class=&#34;code-clipboard&#34;&gt;
   &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
     &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
     &lt;span&gt;Copy&lt;/span&gt;
   &lt;/button&gt;
 &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
 &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;[...]
The in-cluster query URL is:
http://pyroscope.pyroscope-test.svc.cluster.local.:4040/
[...]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Option B: Install Pyroscope as multiple microservices. In this mode, as you scale out the number of instances, they will share a singular backend for storage and querying.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;# Gather the default config for micro-services
curl -Lo values-micro-services.yaml https://raw.githubusercontent.com/grafana/pyroscope/main/operations/pyroscope/helm/pyroscope/values-micro-services.yaml
helm -n pyroscope-test install pyroscope grafana/pyroscope --values values-micro-services.yaml&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;The output of the command contains the query URLs necessary for the following steps, so for a microservice setup, it will look like this:&lt;/p&gt;
&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
 &lt;span class=&#34;code-clipboard&#34;&gt;
   &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
     &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
     &lt;span&gt;Copy&lt;/span&gt;
   &lt;/button&gt;
 &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
 &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;[...]
The in-cluster query URL is:
http://pyroscope-querier.pyroscope-test.svc.cluster.local.:4040
[...]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check the statuses of the Pyroscope pods:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;kubectl -n pyroscope-test get pods&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The results look similar to this when you are in microservices mode:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;kubectl -n pyroscope-test get pods
NAME                                 READY   STATUS    RESTARTS   AGE
pyroscope-agent-7d75b4f9dc-xwpsw        1/1     Running   0          3m23s
pyroscope-distributor-7c474947c-2p5cc   1/1     Running   0          3m23s
pyroscope-distributor-7c474947c-xbszv   1/1     Running   0          3m23s
pyroscope-ingester-0                    1/1     Running   0          5s
pyroscope-ingester-1                    1/1     Running   0          37s
pyroscope-ingester-2                    1/1     Running   0          69s
pyroscope-minio-0                       1/1     Running   0          3m23s
pyroscope-querier-66bf58dfcc-89gb8      1/1     Running   0          3m23s
pyroscope-querier-66bf58dfcc-p7lnc      1/1     Running   0          3m23s
pyroscope-querier-66bf58dfcc-zbggm      1/1     Running   0          3m23s&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Wait until all the pods have a status of &lt;code&gt;Running&lt;/code&gt; or &lt;code&gt;Completed&lt;/code&gt;, which might take a few minutes.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;query-profiles-in-grafana&#34;&gt;Query profiles in Grafana&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install Grafana in the same Kubernetes cluster where you installed Pyroscope.&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;helm upgrade -n pyroscope-test --install grafana grafana/grafana \
  --set image.repository=grafana/grafana \
  --set image.tag=main \
  --set env.GF_PLUGINS_PREINSTALL_SYNC=grafana-pyroscope-app \
  --set env.GF_AUTH_ANONYMOUS_ENABLED=true \
  --set env.GF_AUTH_ANONYMOUS_ORG_ROLE=Admin \
  --set env.GF_DIAGNOSTICS_PROFILING_ENABLED=true \
  --set env.GF_DIAGNOSTICS_PROFILING_ADDR=0.0.0.0 \
  --set env.GF_DIAGNOSTICS_PROFILING_PORT=9094 \
  --set-string &amp;#39;podAnnotations.profiles\.grafana\.com/cpu\.scrape=true&amp;#39; \
  --set-string &amp;#39;podAnnotations.profiles\.grafana\.com/cpu\.port=9094&amp;#39; \
  --set-string &amp;#39;podAnnotations.profiles\.grafana\.com/memory\.scrape=true&amp;#39; \
  --set-string &amp;#39;podAnnotations.profiles\.grafana\.com/memory\.port=9094&amp;#39; \
  --set-string &amp;#39;podAnnotations.profiles\.grafana\.com/goroutine\.scrape=true&amp;#39; \
  --set-string &amp;#39;podAnnotations.profiles\.grafana\.com/goroutine\.port=9094&amp;#39;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For details, see &lt;a href=&#34;/docs/grafana/latest/setup-grafana/installation/kubernetes/&#34;&gt;Deploy Grafana on Kubernetes&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Port-forward Grafana to &lt;code&gt;localhost&lt;/code&gt;, by using the &lt;code&gt;kubectl&lt;/code&gt; command:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;kubectl port-forward -n pyroscope-test service/grafana 3000:80&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In a browser, go to the Grafana server at &lt;a href=&#34;http://localhost:3000&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;http://localhost:3000&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On the left side, go to &lt;strong&gt;Configuration&lt;/strong&gt; &amp;gt; &lt;strong&gt;Data sources&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure a Pyroscope data source to query the Pyroscope server, by using the following settings:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Field&lt;/th&gt;
              &lt;th&gt;Value&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;Name&lt;/td&gt;
              &lt;td&gt;Pyroscope&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;URL&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http://pyroscope-querier.pyroscope-test.svc.cluster.local.:4040/&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;To add a data source, refer to &lt;a href=&#34;/docs/grafana/latest/datasources/add-a-data-source/&#34;&gt;Add a data source&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Verify success:&lt;/p&gt;
&lt;p&gt;You should be able to query profiles in &lt;a href=&#34;/docs/grafana/latest/explore/&#34;&gt;Grafana Explore&lt;/a&gt;,
as well as create dashboard panels by using your newly configured Pyroscope data source.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;optional-persistently-add-data-source&#34;&gt;Optional: Persistently add data source&lt;/h2&gt;
&lt;p&gt;The deployment of Grafana has no persistent database, so it will not retain settings like the data source configuration across restarts.&lt;/p&gt;
&lt;p&gt;To ensure the data source gets provisioned at start-up, create the following &lt;code&gt;datasources.yaml&lt;/code&gt; file:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;datasources:
  pyroscope.yaml:
   apiVersion: 1
   datasources:
   - name: Pyroscope
     type: grafana-pyroscope-datasource
     uid: pyroscope-test
     url: http://pyroscope-querier.pyroscope-test.svc.cluster.local.:4040/&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Modify the Helm deployment by running:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;   helm upgrade -n pyroscope-test --reuse-values grafana grafana/grafana \
     --values datasources.yaml&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;optional-scrape-your-own-workloads-profiles&#34;&gt;Optional: Scrape your own workload&amp;rsquo;s profiles&lt;/h2&gt;
&lt;p&gt;The Pyroscope chart uses a default configuration that causes its agent to scrape Pods, provided they have the correct annotations.
This functionality uses &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;relabel_config&lt;/a&gt; and &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;kubernetes_sd_config&lt;/a&gt; you might be familiar with the Prometheus or Grafana Alloy configuration.&lt;/p&gt;
&lt;p&gt;To get Pyroscope to scrape pods, you must add the following annotations to the Pods:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;metadata:
  annotations:
    profiles.grafana.com/memory.scrape: &amp;#34;true&amp;#34;
    profiles.grafana.com/memory.port: &amp;#34;8080&amp;#34;
    profiles.grafana.com/cpu.scrape: &amp;#34;true&amp;#34;
    profiles.grafana.com/cpu.port: &amp;#34;8080&amp;#34;
    profiles.grafana.com/goroutine.scrape: &amp;#34;true&amp;#34;
    profiles.grafana.com/goroutine.port: &amp;#34;8080&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The above example will scrape the &lt;code&gt;memory&lt;/code&gt;, &lt;code&gt;cpu&lt;/code&gt; and &lt;code&gt;goroutine&lt;/code&gt; profiles from the &lt;code&gt;8080&lt;/code&gt; port of the Pod.&lt;/p&gt;
&lt;p&gt;Each profile type has a set of corresponding annotations which allows customization of scraping per profile type.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;YAML&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-yaml&#34;&gt;metadata:
  annotations:
    profiles.grafana.com/&amp;lt;profile-type&amp;gt;.scrape: &amp;#34;true&amp;#34;
    profiles.grafana.com/&amp;lt;profile-type&amp;gt;.port: &amp;#34;&amp;lt;port&amp;gt;&amp;#34;
    profiles.grafana.com/&amp;lt;profile-type&amp;gt;.port_name: &amp;#34;&amp;lt;port-name&amp;gt;&amp;#34;
    profiles.grafana.com/&amp;lt;profile-type&amp;gt;.scheme: &amp;#34;&amp;lt;scheme&amp;gt;&amp;#34;
    profiles.grafana.com/&amp;lt;profile-type&amp;gt;.path: &amp;#34;&amp;lt;profile_path&amp;gt;&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The full list of profile types supported by annotations is &lt;code&gt;cpu&lt;/code&gt;, &lt;code&gt;memory&lt;/code&gt;, &lt;code&gt;goroutine&lt;/code&gt;, &lt;code&gt;block&lt;/code&gt; and &lt;code&gt;mutex&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The following table describes the annotations:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Annotation&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profiles.grafana.com/&amp;lt;profile-type&amp;gt;.scrape&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Whether to scrape the profile type.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profiles.grafana.com/&amp;lt;profile-type&amp;gt;.port&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The port to scrape the profile type from.&lt;/td&gt;
              &lt;td&gt;``&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profiles.grafana.com/&amp;lt;profile-type&amp;gt;.port_name&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The port name to scrape the profile type from.&lt;/td&gt;
              &lt;td&gt;``&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profiles.grafana.com/&amp;lt;profile-type&amp;gt;.scheme&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The scheme to scrape the profile type from.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;profiles.grafana.com/&amp;lt;profile-type&amp;gt;.path&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The path to scrape the profile type from.&lt;/td&gt;
              &lt;td&gt;default golang path&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;By default, the port is discovered using named port &lt;code&gt;http2&lt;/code&gt; or ending with &lt;code&gt;-metrics&lt;/code&gt; or &lt;code&gt;-profiles&lt;/code&gt;.
If you don&amp;rsquo;t have a named port, the scraping target is dropped.&lt;/p&gt;
&lt;p&gt;If you don&amp;rsquo;t want to use the port name, then you can use the &lt;code&gt;profiles.grafana.com/&amp;lt;profile-type&amp;gt;.port&lt;/code&gt; annotation to statically specify the port number.&lt;/p&gt;
]]></content><description>&lt;h1 id="deploy-pyroscope-using-the-helm-chart">Deploy Pyroscope using the Helm chart&lt;/h1>
&lt;p>The &lt;a href="https://helm.sh/" target="_blank" rel="noopener noreferrer">Helm&lt;/a> chart allows you to configure, install, and upgrade Pyroscope within a Kubernetes cluster.&lt;/p>
&lt;h2 id="before-you-begin">Before you begin&lt;/h2>
&lt;p>These instructions are common across any flavor of Kubernetes and assume that you know how to install, configure, and operate a Kubernetes cluster as well as use &lt;code>kubectl&lt;/code>.&lt;/p></description></item><item><title>Deploy Pyroscope with Jsonnet and Tanka</title><link>https://grafana.com/docs/pyroscope/v1.18.x/deploy-kubernetes/tanka-jsonnet/</link><pubDate>Wed, 08 Apr 2026 14:38:28 +0000</pubDate><guid>https://grafana.com/docs/pyroscope/v1.18.x/deploy-kubernetes/tanka-jsonnet/</guid><content><![CDATA[&lt;h1 id=&#34;deploy-pyroscope-with-jsonnet-and-tanka&#34;&gt;Deploy Pyroscope with Jsonnet and Tanka&lt;/h1&gt;
&lt;p&gt;Grafana Labs publishes a &lt;a href=&#34;https://jsonnet.org/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Jsonnet&lt;/a&gt; library that you can use to deploy Pyroscope.
The Jsonnet files are located in the &lt;a href=&#34;https://github.com/grafana/pyroscope/tree/main/operations/pyroscope/jsonnet&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Pyroscope repository&lt;/a&gt; and are using the helm charts as a source.&lt;/p&gt;
&lt;h2 id=&#34;install-tools-and-deploy-the-first-cluster&#34;&gt;Install tools and deploy the first cluster&lt;/h2&gt;
&lt;p&gt;You can use &lt;a href=&#34;https://tanka.dev/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Tanka&lt;/a&gt; and &lt;a href=&#34;https://github.com/jsonnet-bundler/jsonnet-bundler&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;jsonnet-bundler&lt;/a&gt; to generate Kubernetes YAML manifests from the jsonnet files.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install &lt;code&gt;tanka&lt;/code&gt; and &lt;code&gt;jb&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;Follow the steps at &lt;a href=&#34;https://tanka.dev/install&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://tanka.dev/install&lt;/a&gt;. If you have &lt;code&gt;go&lt;/code&gt; installed locally you can also use:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;console&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-console&#34;&gt;# make sure to be outside of GOPATH or a go.mod project
go install github.com/grafana/tanka/cmd/tk@latest
go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set up a Jsonnet project, based on the example that follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Initialize Tanka&lt;/li&gt;
&lt;li&gt;Install Pyroscope and Kubernetes Jsonnet libraries&lt;/li&gt;
&lt;li&gt;Set up an environment&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;console&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-console&#34;&gt;# Initialize a Tanka directory
mkdir jsonnet-example &amp;amp;&amp;amp; cd jsonnet-example
tk init --k8s=1.21

# Install Pyroscope jsonnet
jb install github.com/grafana/pyroscope/operations/pyroscope@main

# Install required tanka-util
jb install github.com/grafana/jsonnet-libs/tanka-util@master

# Setup your current cluster as the server for the default environment
tk env set environments/default --server-from-context=$(kubectl config current-context)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Decide if you want to run Pyroscope in the monolithic or the microservices mode&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Option A) For monolithic mode the file &lt;code&gt;environments/default/main.jsonnet&lt;/code&gt;, should look like;&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;jsonnet&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-jsonnet&#34;&gt;local pyroscope = import &amp;#39;pyroscope/jsonnet/pyroscope/pyroscope.libsonnet&amp;#39;;
local tk = import &amp;#39;tk&amp;#39;;

pyroscope.new(overrides={
  namespace: tk.env.spec.namespace,
})&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Option B) For microservices mode the file &lt;code&gt;environments/default/main.jsonnet&lt;/code&gt;, should look like;&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;jsonnet&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-jsonnet&#34;&gt;local pyroscope = import &amp;#39;pyroscope/jsonnet/pyroscope/pyroscope.libsonnet&amp;#39;;
local valuesMicroServices = import &amp;#39;pyroscope/jsonnet/values-micro-services.json&amp;#39;;
local tk = import &amp;#39;tk&amp;#39;;

pyroscope.new(overrides={
  namespace: tk.env.spec.namespace,
  values&amp;#43;: valuesMicroServices,
})&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Generate the Kubernetes YAML manifests and store them in the &lt;code&gt;./manifests&lt;/code&gt; directory:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;console&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-console&#34;&gt;# Take a look at the generated YAML manifests.
tk show environments/default

# Export the YAML manifests to the folder `./manifests`:
tk export ./manifests environments/default&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Deploy the manifests to a Kubernetes cluster, in one of two ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Use the &lt;code&gt;tk apply&lt;/code&gt; command&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Tanka supports commands to show the &lt;code&gt;diff&lt;/code&gt; and &lt;code&gt;apply&lt;/code&gt; changes to a Kubernetes cluster:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;console&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-console&#34;&gt;# Show the difference between your Jsonnet definition and your Kubernetes cluster:
tk diff environments/default

# Apply changes to your Kubernetes cluster:
tk apply environments/default&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Use the &lt;code&gt;kubectl apply&lt;/code&gt; command&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;You generated the Kubernetes manifests and stored them in the &lt;code&gt;./manifests&lt;/code&gt; directory in the previous step.&lt;/p&gt;
&lt;p&gt;You can run the following command to directly apply these manifests to your Kubernetes cluster:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;console&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-console&#34;&gt;# Review the changes that will apply to your Kubernetes cluster:
kubectl apply --dry-run=client -k manifests/

# Apply the changes to your Kubernetes cluster:
kubectl apply -k manifests/&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The generated Kubernetes manifests create resources in the &lt;code&gt;default&lt;/code&gt; namespace. To use a different namespace, change the &lt;code&gt;namespace&lt;/code&gt; configuration option in the &lt;code&gt;environments/default/main.jsonnet&lt;/code&gt; file, and re-generate the Kubernetes manifests.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="deploy-pyroscope-with-jsonnet-and-tanka">Deploy Pyroscope with Jsonnet and Tanka&lt;/h1>
&lt;p>Grafana Labs publishes a &lt;a href="https://jsonnet.org/" target="_blank" rel="noopener noreferrer">Jsonnet&lt;/a> library that you can use to deploy Pyroscope.
The Jsonnet files are located in the &lt;a href="https://github.com/grafana/pyroscope/tree/main/operations/pyroscope/jsonnet" target="_blank" rel="noopener noreferrer">Pyroscope repository&lt;/a> and are using the helm charts as a source.&lt;/p></description></item></channel></rss>