diff --git a/pr-preview/pr-974/chunk-map.json b/pr-preview/pr-974/chunk-map.json index 3eeba22fc..b398a06f1 100644 --- a/pr-preview/pr-974/chunk-map.json +++ b/pr-preview/pr-974/chunk-map.json @@ -1 +1 @@ -{"polyfill":["/polyfill-8d34c62e07e660a83f29.js"],"app":["/app-fe1df843bc5032f42db1.js"],"component---cache-caches-gatsby-plugin-offline-app-shell-js":["/component---cache-caches-gatsby-plugin-offline-app-shell-js-099d9276a41f4ba01a3c.js"],"component---docs-completion-md":["/component---docs-completion-md-3d444c7b31269f9b6ec9.js"],"component---docs-config-md":["/component---docs-config-md-b129057e083bbcf09ffa.js"],"component---docs-diff-strategy-md":["/component---docs-diff-strategy-md-bd3d2d2e7acc151ffe31.js"],"component---docs-directory-structure-md":["/component---docs-directory-structure-md-6dea361c21c6279c45b0.js"],"component---docs-env-vars-md":["/component---docs-env-vars-md-102b70747bbd7865e8e8.js"],"component---docs-exporting-md":["/component---docs-exporting-md-e3c520ed1cc2df15aafc.js"],"component---docs-faq-md":["/component---docs-faq-md-5e30ff990ba5de27e68d.js"],"component---docs-formatting-md":["/component---docs-formatting-md-0886509974e2523e2e68.js"],"component---docs-garbage-collection-md":["/component---docs-garbage-collection-md-9e3ddba81e297bbaee58.js"],"component---docs-helm-mdx":["/component---docs-helm-mdx-66915b8a90082eae9ee5.js"],"component---docs-inline-environments-mdx":["/component---docs-inline-environments-mdx-438dd359ab9fafbc9e4f.js"],"component---docs-installation-mdx":["/component---docs-installation-mdx-098e61d7d42fc927a388.js"],"component---docs-introduction-mdx":["/component---docs-introduction-mdx-53424fcd5b068bb753bd.js"],"component---docs-jsonnet-injecting-values-md":["/component---docs-jsonnet-injecting-values-md-a2e9fadf417770db1b80.js"],"component---docs-jsonnet-main-md":["/component---docs-jsonnet-main-md-041efed1c891707fb3eb.js"],"component---docs-jsonnet-native-functions-md":["/component---docs-jsonnet-native-functions-md-2b62620b62d073a3473b.js"],"component---docs-jsonnet-overview-md":["/component---docs-jsonnet-overview-md-f7d8d3da6005892868a0.js"],"component---docs-known-issues-md":["/component---docs-known-issues-md-2b1c7bae83f2275bce8c.js"],"component---docs-kustomize-mdx":["/component---docs-kustomize-mdx-b8de0a9f83d04b2d49d5.js"],"component---docs-libraries-import-paths-md":["/component---docs-libraries-import-paths-md-421d47718426d7f0ac13.js"],"component---docs-libraries-install-publish-md":["/component---docs-libraries-install-publish-md-1cb5bebde0944f8f75bb.js"],"component---docs-libraries-overriding-md":["/component---docs-libraries-overriding-md-942a4d14de14e02ba75d.js"],"component---docs-namespaces-md":["/component---docs-namespaces-md-a40e87498f5d6ed5b260.js"],"component---docs-server-side-apply-md":["/component---docs-server-side-apply-md-c9b257757eaa34c29b08.js"],"component---docs-targets-md":["/component---docs-targets-md-123f8be890eda328d792.js"],"component---docs-tutorial-abstraction-mdx":["/component---docs-tutorial-abstraction-mdx-b97edf44038784f040f4.js"],"component---docs-tutorial-environments-mdx":["/component---docs-tutorial-environments-mdx-b932dda633298bd4750f.js"],"component---docs-tutorial-jsonnet-mdx":["/component---docs-tutorial-jsonnet-mdx-5d6acd1cbdc3ac766655.js"],"component---docs-tutorial-k-lib-mdx":["/component---docs-tutorial-k-lib-mdx-41d9b29aedcacf3ffcdf.js"],"component---docs-tutorial-overview-mdx":["/component---docs-tutorial-overview-mdx-099bc8e84a0bf000e006.js"],"component---docs-tutorial-parameterizing-mdx":["/component---docs-tutorial-parameterizing-mdx-cb9c8ff66607e77042cd.js"],"component---docs-tutorial-refresher-mdx":["/component---docs-tutorial-refresher-mdx-67e79a7d746867ef4fe4.js"],"component---src-components-home-snippet-mdx":[],"component---src-components-install-jb-arch-mdx":[],"component---src-components-install-jb-binary-mdx":[],"component---src-components-install-jb-go-mdx":[],"component---src-components-install-jb-osx-mdx":[],"component---src-components-install-tk-arch-mdx":[],"component---src-components-install-tk-binary-mdx":[],"component---src-components-install-tk-go-mdx":[],"component---src-components-install-tk-osx-mdx":[]} \ No newline at end of file +{"polyfill":["/polyfill-8d34c62e07e660a83f29.js"],"app":["/app-fe1df843bc5032f42db1.js"],"component---cache-caches-gatsby-plugin-offline-app-shell-js":["/component---cache-caches-gatsby-plugin-offline-app-shell-js-099d9276a41f4ba01a3c.js"],"component---docs-completion-md":["/component---docs-completion-md-3d444c7b31269f9b6ec9.js"],"component---docs-config-md":["/component---docs-config-md-b129057e083bbcf09ffa.js"],"component---docs-diff-strategy-md":["/component---docs-diff-strategy-md-bd3d2d2e7acc151ffe31.js"],"component---docs-directory-structure-md":["/component---docs-directory-structure-md-6dea361c21c6279c45b0.js"],"component---docs-env-vars-md":["/component---docs-env-vars-md-102b70747bbd7865e8e8.js"],"component---docs-exporting-md":["/component---docs-exporting-md-e3c520ed1cc2df15aafc.js"],"component---docs-faq-md":["/component---docs-faq-md-5e30ff990ba5de27e68d.js"],"component---docs-formatting-md":["/component---docs-formatting-md-0886509974e2523e2e68.js"],"component---docs-garbage-collection-md":["/component---docs-garbage-collection-md-9e3ddba81e297bbaee58.js"],"component---docs-helm-mdx":["/component---docs-helm-mdx-66915b8a90082eae9ee5.js"],"component---docs-inline-environments-mdx":["/component---docs-inline-environments-mdx-438dd359ab9fafbc9e4f.js"],"component---docs-installation-mdx":["/component---docs-installation-mdx-098e61d7d42fc927a388.js"],"component---docs-introduction-mdx":["/component---docs-introduction-mdx-53424fcd5b068bb753bd.js"],"component---docs-jsonnet-injecting-values-md":["/component---docs-jsonnet-injecting-values-md-a2e9fadf417770db1b80.js"],"component---docs-jsonnet-main-md":["/component---docs-jsonnet-main-md-041efed1c891707fb3eb.js"],"component---docs-jsonnet-native-functions-md":["/component---docs-jsonnet-native-functions-md-2b62620b62d073a3473b.js"],"component---docs-jsonnet-overview-md":["/component---docs-jsonnet-overview-md-f7d8d3da6005892868a0.js"],"component---docs-known-issues-md":["/component---docs-known-issues-md-2b1c7bae83f2275bce8c.js"],"component---docs-kustomize-mdx":["/component---docs-kustomize-mdx-b8de0a9f83d04b2d49d5.js"],"component---docs-libraries-import-paths-md":["/component---docs-libraries-import-paths-md-421d47718426d7f0ac13.js"],"component---docs-libraries-install-publish-md":["/component---docs-libraries-install-publish-md-1cb5bebde0944f8f75bb.js"],"component---docs-libraries-overriding-md":["/component---docs-libraries-overriding-md-942a4d14de14e02ba75d.js"],"component---docs-namespaces-md":["/component---docs-namespaces-md-a40e87498f5d6ed5b260.js"],"component---docs-server-side-apply-md":["/component---docs-server-side-apply-md-c9b257757eaa34c29b08.js"],"component---docs-targets-md":["/component---docs-targets-md-123f8be890eda328d792.js"],"component---docs-tutorial-abstraction-mdx":["/component---docs-tutorial-abstraction-mdx-b97edf44038784f040f4.js"],"component---docs-tutorial-environments-mdx":["/component---docs-tutorial-environments-mdx-b932dda633298bd4750f.js"],"component---docs-tutorial-jsonnet-mdx":["/component---docs-tutorial-jsonnet-mdx-5d6acd1cbdc3ac766655.js"],"component---docs-tutorial-k-lib-mdx":["/component---docs-tutorial-k-lib-mdx-41d9b29aedcacf3ffcdf.js"],"component---docs-tutorial-overview-mdx":["/component---docs-tutorial-overview-mdx-099bc8e84a0bf000e006.js"],"component---docs-tutorial-parameterizing-mdx":["/component---docs-tutorial-parameterizing-mdx-cb9c8ff66607e77042cd.js"],"component---docs-tutorial-refresher-mdx":["/component---docs-tutorial-refresher-mdx-81bba2a6cc6987e2c96b.js"],"component---src-components-home-snippet-mdx":[],"component---src-components-install-jb-arch-mdx":[],"component---src-components-install-jb-binary-mdx":[],"component---src-components-install-jb-go-mdx":[],"component---src-components-install-jb-osx-mdx":[],"component---src-components-install-tk-arch-mdx":[],"component---src-components-install-tk-binary-mdx":[],"component---src-components-install-tk-go-mdx":[],"component---src-components-install-tk-osx-mdx":[]} \ No newline at end of file diff --git a/pr-preview/pr-974/completion/index.html b/pr-preview/pr-974/completion/index.html index f2636f04b..b37a125a8 100644 --- a/pr-preview/pr-974/completion/index.html +++ b/pr-preview/pr-974/completion/index.html @@ -1,4 +1,4 @@ -Command-line completion | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Command-line Completion

Tanka supports CLI completion for bash, zsh and fish.

# Install
+Command-line completion | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Command-line Completion

Tanka supports CLI completion for bash, zsh and fish.

# Install
 $ tk complete
 
 # Uninstall
@@ -34,4 +34,4 @@
 .material-theme-darker .mtki { font-style: italic; }
 .material-theme-darker .mtkb { font-weight: bold; }
 .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }
-
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/component---docs-tutorial-refresher-mdx-67e79a7d746867ef4fe4.js b/pr-preview/pr-974/component---docs-tutorial-refresher-mdx-81bba2a6cc6987e2c96b.js similarity index 90% rename from pr-preview/pr-974/component---docs-tutorial-refresher-mdx-67e79a7d746867ef4fe4.js rename to pr-preview/pr-974/component---docs-tutorial-refresher-mdx-81bba2a6cc6987e2c96b.js index b0eea594c..3671459a0 100644 --- a/pr-preview/pr-974/component---docs-tutorial-refresher-mdx-67e79a7d746867ef4fe4.js +++ b/pr-preview/pr-974/component---docs-tutorial-refresher-mdx-81bba2a6cc6987e2c96b.js @@ -1,2 +1,2 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[34],{Xb6S:function(a,e,s){"use strict";s.r(e),s.d(e,"_frontmatter",(function(){return l})),s.d(e,"default",(function(){return i}));var t=s("wx14"),n=s("Ff2n"),m=(s("q1tI"),s("7ljp")),p=s("hhGP"),c=s("Z+0r");s("qKvR");const b=["components"],l={};void 0!==l&&l&&l===Object(l)&&Object.isExtensible(l)&&!Object.prototype.hasOwnProperty.call(l,"__filemeta")&&Object.defineProperty(l,"__filemeta",{configurable:!0,value:{name:"_frontmatter",filename:"docs/tutorial/refresher.mdx"}});const N={_frontmatter:l},r=p.a;function i(a){let{components:e}=a,s=Object(n.a)(a,b);return Object(m.b)(r,Object(t.a)({},N,s,{components:e,mdxType:"MDXLayout"}),Object(m.b)("h1",{id:"refresher-on-deploying"},"Refresher on deploying"),Object(m.b)("h2",{id:"deploying-to-kubernetes-using-kubectl"},"Deploying to Kubernetes using kubectl"),Object(m.b)("p",null,"To understand how Tanka works, it is important to know what steps are required\nfor the task of deploying Grafana and Prometheus to Kubernetes:"),Object(m.b)("ol",null,Object(m.b)("li",{parentName:"ol"},"Prometheus",Object(m.b)("ul",{parentName:"li"},Object(m.b)("li",{parentName:"ul"},"A ",Object(m.b)("inlineCode",{parentName:"li"},"Deployment")," must be created, to run the ",Object(m.b)("inlineCode",{parentName:"li"},"prom/prometheus")," image"),Object(m.b)("li",{parentName:"ul"},"Also a ",Object(m.b)("inlineCode",{parentName:"li"},"Service")," is needed for Grafana to be able to connect port ",Object(m.b)("inlineCode",{parentName:"li"},"9090")," of\nPrometheus."))),Object(m.b)("li",{parentName:"ol"},"Grafana",Object(m.b)("ul",{parentName:"li"},Object(m.b)("li",{parentName:"ul"},"Another ",Object(m.b)("inlineCode",{parentName:"li"},"Deployment")," is required for the Grafana server."),Object(m.b)("li",{parentName:"ul"},"To connect to the web interface, we will be using a ",Object(m.b)("inlineCode",{parentName:"li"},"Service")," of type\n",Object(m.b)("inlineCode",{parentName:"li"},"NodePort"),".")))),Object(m.b)("p",null,"Before taking a look how Tanka can help doing so, let's recall how to do it with\nplain ",Object(m.b)("inlineCode",{parentName:"p"},"kubectl"),"."),Object(m.b)("h2",{id:"writing-the-yaml"},"Writing the yaml"),Object(m.b)("p",null,Object(m.b)("inlineCode",{parentName:"p"},"kubectl")," expects the resources it should create in ",Object(m.b)("inlineCode",{parentName:"p"},".yaml")," format. For Grafana\n..."),Object(m.b)("h5",{id:"grafanayaml"},"grafana.yaml:"),Object(m.b)("pre",{className:"material-theme-darker vscode-highlight","data-language":"yaml"},Object(m.b)("code",{parentName:"pre",className:"vscode-highlight-code"},Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk3 mtki"},"# Grafana server Deployment")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"apiVersion"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"apps/v1")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"kind"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"Deployment")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"metadata"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"spec"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"selector"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"matchLabels"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"template"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"metadata"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"labels"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"spec"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"containers"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk5"},"-"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"image"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana/grafana")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"ports"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk5"},"-"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"containerPort"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk4"},"3000")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"ui")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"---")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk3 mtki"},"# Grafana UI Service NodePort")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"apiVersion"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"v1")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"kind"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"Service")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"metadata"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"labels"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"spec"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"ports"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk5"},"-"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana-ui")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"port"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk4"},"3000")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"targetPort"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk4"},"3000")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"selector"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"type"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"NodePort")))),Object(m.b)("p",null,"... and for Prometheus:"),Object(m.b)("h5",{id:"prometheusyaml"},"prometheus.yaml"),Object(m.b)("pre",{className:"material-theme-darker vscode-highlight","data-language":"yaml"},Object(m.b)("code",{parentName:"pre",className:"vscode-highlight-code"},Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk3 mtki"},"# Prometheus server Deployment")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"apiVersion"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"apps/v1")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"kind"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"Deployment")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"metadata"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prometheus")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"spec"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"selector"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"matchLabels"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prometheus")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"template"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"metadata"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"labels"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prometheus")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"spec"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"containers"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk5"},"-"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"image"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prom/prometheus")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prometheus")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"ports"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk5"},"-"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"containerPort"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk4"},"9090")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"api")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"---")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk3 mtki"},"# Prometheus API Service")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"apiVersion"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"v1")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"kind"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"Service")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"metadata"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"labels"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prometheus")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prometheus")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"spec"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"ports"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk5"},"-"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prometheus-api")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"port"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk4"},"9090")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"targetPort"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk4"},"9090")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"selector"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prometheus")))),Object(m.b)("p",null,"That's pretty verbose, right?"),Object(m.b)("p",null,"Even worse, there are labels and matchers (e.g. ",Object(m.b)("inlineCode",{parentName:"p"},"prometheus"),") that need to be\nexactly the same scattered across the file. It's a nightmare to debug and\nfurthermore harms readability a lot."),Object(m.b)("h2",{id:"deploying-to-the-cluster"},"Deploying to the cluster"),Object(m.b)("p",null,"To actually apply those resources, copy them into ",Object(m.b)("inlineCode",{parentName:"p"},".yaml")," files and use:"),Object(m.b)("pre",{className:"material-theme-darker vscode-highlight","data-language":"bash"},Object(m.b)("code",{parentName:"pre",className:"vscode-highlight-code"},Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"$ kubectl apply -f prometheus.yaml -f grafana.yaml")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"deployment.apps/grafana created")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"deployment.apps/prometheus created")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"service/grafana created")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"service/prometheus created")))),Object(m.b)("h2",{id:"checking-it-worked"},"Checking it worked"),Object(m.b)("p",null,"So far so good, but can we tell it actually did what we wanted? Let's test that\nGrafana can connect to Prometheus!"),Object(m.b)("pre",{className:"material-theme-darker vscode-highlight","data-language":"bash"},Object(m.b)("code",{parentName:"pre",className:"vscode-highlight-code"},Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk3 mtki"},"# Temporarily forward Grafana to localhost")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"kubectl port-forward deployments/grafana 8080:3000")))),Object(m.b)("p",null,"Now go to http://localhost:8080 in your browser and login using ",Object(m.b)("inlineCode",{parentName:"p"},"admin:admin"),".\nThen navigate to ",Object(m.b)("inlineCode",{parentName:"p"},"Connections > Data Sources > Add data source"),", choose\n",Object(m.b)("inlineCode",{parentName:"p"},"Prometheus")," as type and enter ",Object(m.b)("inlineCode",{parentName:"p"},"http://prometheus:9090")," as URL. Hit\n",Object(m.b)("inlineCode",{parentName:"p"},"Save & Test")," which should yield a big green bar telling you everything is good."),Object(m.b)("p",null,"Cool! This worked out well for this small example, but the ",Object(m.b)("inlineCode",{parentName:"p"},".yaml")," files are\nhard to read and maintain. Especially when you need to deploy this exact same\nthing in ",Object(m.b)("inlineCode",{parentName:"p"},"dev")," and ",Object(m.b)("inlineCode",{parentName:"p"},"prod")," your choices are very limited."),Object(m.b)("p",null,"Let's explore how Tanka can help us here in the next section!"),Object(m.b)("h2",{id:"cleaning-up"},"Cleaning up"),Object(m.b)("p",null,"Let's remove everything we created to start fresh with Jsonnet in the next section:"),Object(m.b)("pre",{className:"material-theme-darker vscode-highlight","data-language":"bash"},Object(m.b)("code",{parentName:"pre",className:"vscode-highlight-code"},Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"$ kubectl delete -f prometheus.yaml -f grafana.yaml")))),Object(m.b)(c.a,{prev:"/tutorial/overview",next:"/tutorial/jsonnet",mdxType:"TutorialButtons"}),Object(m.b)("style",{className:"vscode-highlight-styles"},"\n \n .material-theme-darker {\nbackground-color: #212121;\ncolor: #EEFFFF;\n}\n\n.material-theme-darker .mtk1 { color: #FFFFFF; }\n.material-theme-darker .mtk2 { color: #212121; }\n.material-theme-darker .mtk3 { color: #545454; }\n.material-theme-darker .mtk4 { color: #F78C6C; }\n.material-theme-darker .mtk5 { color: #89DDFF; }\n.material-theme-darker .mtk6 { color: #C3E88D; }\n.material-theme-darker .mtk7 { color: #FFCB6B; }\n.material-theme-darker .mtk8 { color: #EEFFFF; }\n.material-theme-darker .mtk9 { color: #82AAFF; }\n.material-theme-darker .mtk10 { color: #FF5370; }\n.material-theme-darker .mtk11 { color: #F07178; }\n.material-theme-darker .mtk12 { color: #C792EA; }\n.material-theme-darker .mtk13 { color: #EEFFFF90; }\n.material-theme-darker .mtk14 { color: #65737E; }\n.material-theme-darker .mtk15 { color: #B2CCD6; }\n.material-theme-darker .mtk16 { color: #C17E70; }\n.material-theme-darker .mtki { font-style: italic; }\n.material-theme-darker .mtkb { font-weight: bold; }\n.material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }\n"))}void 0!==i&&i&&i===Object(i)&&Object.isExtensible(i)&&!Object.prototype.hasOwnProperty.call(i,"__filemeta")&&Object.defineProperty(i,"__filemeta",{configurable:!0,value:{name:"MDXContent",filename:"docs/tutorial/refresher.mdx"}}),i.isMDXComponent=!0}}]); -//# sourceMappingURL=component---docs-tutorial-refresher-mdx-67e79a7d746867ef4fe4.js.map \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[34],{Xb6S:function(a,e,s){"use strict";s.r(e),s.d(e,"_frontmatter",(function(){return l})),s.d(e,"default",(function(){return i}));var t=s("wx14"),n=s("Ff2n"),m=(s("q1tI"),s("7ljp")),p=s("hhGP"),c=s("Z+0r");s("qKvR");const b=["components"],l={};void 0!==l&&l&&l===Object(l)&&Object.isExtensible(l)&&!Object.prototype.hasOwnProperty.call(l,"__filemeta")&&Object.defineProperty(l,"__filemeta",{configurable:!0,value:{name:"_frontmatter",filename:"docs/tutorial/refresher.mdx"}});const N={_frontmatter:l},r=p.a;function i(a){let{components:e}=a,s=Object(n.a)(a,b);return Object(m.b)(r,Object(t.a)({},N,s,{components:e,mdxType:"MDXLayout"}),Object(m.b)("h1",{id:"refresher-on-deploying"},"Refresher on deploying"),Object(m.b)("h2",{id:"deploying-to-kubernetes-using-kubectl"},"Deploying to Kubernetes using kubectl"),Object(m.b)("p",null,"To understand how Tanka works, it is important to know what steps are required\nfor the task of deploying Grafana and Prometheus to Kubernetes:"),Object(m.b)("ol",null,Object(m.b)("li",{parentName:"ol"},"Prometheus",Object(m.b)("ul",{parentName:"li"},Object(m.b)("li",{parentName:"ul"},"A ",Object(m.b)("inlineCode",{parentName:"li"},"Deployment")," must be created, to run the ",Object(m.b)("inlineCode",{parentName:"li"},"prom/prometheus")," image"),Object(m.b)("li",{parentName:"ul"},"Also a ",Object(m.b)("inlineCode",{parentName:"li"},"Service")," is needed for Grafana to be able to connect port ",Object(m.b)("inlineCode",{parentName:"li"},"9090")," of\nPrometheus."))),Object(m.b)("li",{parentName:"ol"},"Grafana",Object(m.b)("ul",{parentName:"li"},Object(m.b)("li",{parentName:"ul"},"Another ",Object(m.b)("inlineCode",{parentName:"li"},"Deployment")," is required for the Grafana server."),Object(m.b)("li",{parentName:"ul"},"To connect to the web interface, we will be using a ",Object(m.b)("inlineCode",{parentName:"li"},"Service")," of type\n",Object(m.b)("inlineCode",{parentName:"li"},"NodePort"),".")))),Object(m.b)("p",null,"Before taking a look how Tanka can help doing so, let's recall how to do it with\nplain ",Object(m.b)("inlineCode",{parentName:"p"},"kubectl"),"."),Object(m.b)("h2",{id:"writing-the-yaml"},"Writing the yaml"),Object(m.b)("p",null,Object(m.b)("inlineCode",{parentName:"p"},"kubectl")," expects the resources it should create in ",Object(m.b)("inlineCode",{parentName:"p"},".yaml")," format. For Grafana\n..."),Object(m.b)("h5",{id:"grafanayaml"},"grafana.yaml:"),Object(m.b)("pre",{className:"material-theme-darker vscode-highlight","data-language":"yaml"},Object(m.b)("code",{parentName:"pre",className:"vscode-highlight-code"},Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk3 mtki"},"# Grafana server Deployment")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"apiVersion"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"apps/v1")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"kind"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"Deployment")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"metadata"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"spec"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"selector"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"matchLabels"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"template"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"metadata"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"labels"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"spec"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"containers"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk5"},"-"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"image"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana/grafana")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"ports"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk5"},"-"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"containerPort"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk4"},"3000")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"ui")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"---")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk3 mtki"},"# Grafana UI Service NodePort")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"apiVersion"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"v1")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"kind"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"Service")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"metadata"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"labels"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"spec"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"ports"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk5"},"-"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana-ui")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"port"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk4"},"3000")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"targetPort"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk4"},"3000")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"selector"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"grafana")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"type"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"NodePort")))),Object(m.b)("p",null,"... and for Prometheus:"),Object(m.b)("h5",{id:"prometheusyaml"},"prometheus.yaml"),Object(m.b)("pre",{className:"material-theme-darker vscode-highlight","data-language":"yaml"},Object(m.b)("code",{parentName:"pre",className:"vscode-highlight-code"},Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk3 mtki"},"# Prometheus server Deployment")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"apiVersion"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"apps/v1")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"kind"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"Deployment")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"metadata"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prometheus")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"spec"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"selector"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"matchLabels"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prometheus")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"template"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"metadata"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"labels"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prometheus")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"spec"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"containers"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk5"},"-"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"image"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prom/prometheus")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prometheus")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"ports"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk5"},"-"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"containerPort"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk4"},"9090")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"api")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"---")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk3 mtki"},"# Prometheus API Service")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"apiVersion"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"v1")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"kind"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"Service")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"metadata"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"labels"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prometheus")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prometheus")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk11"},"spec"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"ports"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk5"},"-"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prometheus-api")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"port"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk4"},"9090")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"targetPort"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk4"},"9090")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"selector"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk11"},"name"),Object(m.b)("span",{parentName:"span",className:"mtk5"},":"),Object(m.b)("span",{parentName:"span",className:"mtk1"}," "),Object(m.b)("span",{parentName:"span",className:"mtk6"},"prometheus")))),Object(m.b)("p",null,"That's pretty verbose, right?"),Object(m.b)("p",null,"Even worse, there are labels and matchers (e.g. ",Object(m.b)("inlineCode",{parentName:"p"},"prometheus"),") that need to be\nexactly the same scattered across the file. It's a nightmare to debug and\nfurthermore harms readability a lot."),Object(m.b)("h2",{id:"deploying-to-the-cluster"},"Deploying to the cluster"),Object(m.b)("p",null,"To actually apply those resources, copy them into ",Object(m.b)("inlineCode",{parentName:"p"},".yaml")," files and use:"),Object(m.b)("pre",{className:"material-theme-darker vscode-highlight","data-language":"bash"},Object(m.b)("code",{parentName:"pre",className:"vscode-highlight-code"},Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"$ kubectl apply -f prometheus.yaml -f grafana.yaml")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"deployment.apps/grafana created")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"deployment.apps/prometheus created")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"service/grafana created")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"service/prometheus created")))),Object(m.b)("h2",{id:"checking-it-worked"},"Checking it worked"),Object(m.b)("p",null,"So far so good, but can we tell it actually did what we wanted? Let's test that\nGrafana can connect to Prometheus!"),Object(m.b)("pre",{className:"material-theme-darker vscode-highlight","data-language":"bash"},Object(m.b)("code",{parentName:"pre",className:"vscode-highlight-code"},Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk3 mtki"},"# Temporarily forward Grafana to localhost")),"\n",Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"kubectl port-forward deployments/grafana 8080:3000")))),Object(m.b)("p",null,"Now go to http://localhost:8080 in your browser and login using ",Object(m.b)("inlineCode",{parentName:"p"},"admin:admin"),".\nThen navigate to ",Object(m.b)("inlineCode",{parentName:"p"},"Connections > Data sources > Add new data source"),", choose\n",Object(m.b)("inlineCode",{parentName:"p"},"Prometheus")," as type and enter ",Object(m.b)("inlineCode",{parentName:"p"},"http://prometheus:9090")," as URL. Hit\n",Object(m.b)("inlineCode",{parentName:"p"},"Save & Test")," which should yield a big green bar telling you everything is good."),Object(m.b)("p",null,"Cool! This worked out well for this small example, but the ",Object(m.b)("inlineCode",{parentName:"p"},".yaml")," files are\nhard to read and maintain. Especially when you need to deploy this exact same\nthing in ",Object(m.b)("inlineCode",{parentName:"p"},"dev")," and ",Object(m.b)("inlineCode",{parentName:"p"},"prod")," your choices are very limited."),Object(m.b)("p",null,"Let's explore how Tanka can help us here in the next section!"),Object(m.b)("h2",{id:"cleaning-up"},"Cleaning up"),Object(m.b)("p",null,"Let's remove everything we created to start fresh with Jsonnet in the next section:"),Object(m.b)("pre",{className:"material-theme-darker vscode-highlight","data-language":"bash"},Object(m.b)("code",{parentName:"pre",className:"vscode-highlight-code"},Object(m.b)("span",{parentName:"code",className:"vscode-highlight-line"},Object(m.b)("span",{parentName:"span",className:"mtk1"},"$ kubectl delete -f prometheus.yaml -f grafana.yaml")))),Object(m.b)(c.a,{prev:"/tutorial/overview",next:"/tutorial/jsonnet",mdxType:"TutorialButtons"}),Object(m.b)("style",{className:"vscode-highlight-styles"},"\n \n .material-theme-darker {\nbackground-color: #212121;\ncolor: #EEFFFF;\n}\n\n.material-theme-darker .mtk1 { color: #FFFFFF; }\n.material-theme-darker .mtk2 { color: #212121; }\n.material-theme-darker .mtk3 { color: #545454; }\n.material-theme-darker .mtk4 { color: #F78C6C; }\n.material-theme-darker .mtk5 { color: #89DDFF; }\n.material-theme-darker .mtk6 { color: #C3E88D; }\n.material-theme-darker .mtk7 { color: #FFCB6B; }\n.material-theme-darker .mtk8 { color: #EEFFFF; }\n.material-theme-darker .mtk9 { color: #82AAFF; }\n.material-theme-darker .mtk10 { color: #FF5370; }\n.material-theme-darker .mtk11 { color: #F07178; }\n.material-theme-darker .mtk12 { color: #C792EA; }\n.material-theme-darker .mtk13 { color: #EEFFFF90; }\n.material-theme-darker .mtk14 { color: #65737E; }\n.material-theme-darker .mtk15 { color: #B2CCD6; }\n.material-theme-darker .mtk16 { color: #C17E70; }\n.material-theme-darker .mtki { font-style: italic; }\n.material-theme-darker .mtkb { font-weight: bold; }\n.material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }\n"))}void 0!==i&&i&&i===Object(i)&&Object.isExtensible(i)&&!Object.prototype.hasOwnProperty.call(i,"__filemeta")&&Object.defineProperty(i,"__filemeta",{configurable:!0,value:{name:"MDXContent",filename:"docs/tutorial/refresher.mdx"}}),i.isMDXComponent=!0}}]); +//# sourceMappingURL=component---docs-tutorial-refresher-mdx-81bba2a6cc6987e2c96b.js.map \ No newline at end of file diff --git a/pr-preview/pr-974/component---docs-tutorial-refresher-mdx-67e79a7d746867ef4fe4.js.map b/pr-preview/pr-974/component---docs-tutorial-refresher-mdx-81bba2a6cc6987e2c96b.js.map similarity index 94% rename from pr-preview/pr-974/component---docs-tutorial-refresher-mdx-67e79a7d746867ef4fe4.js.map rename to pr-preview/pr-974/component---docs-tutorial-refresher-mdx-81bba2a6cc6987e2c96b.js.map index 5394c5151..edc59ef96 100644 --- a/pr-preview/pr-974/component---docs-tutorial-refresher-mdx-67e79a7d746867ef4fe4.js.map +++ b/pr-preview/pr-974/component---docs-tutorial-refresher-mdx-81bba2a6cc6987e2c96b.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./docs/tutorial/refresher.mdx"],"names":["_frontmatter","Object","isExtensible","prototype","hasOwnProperty","call","defineProperty","configurable","value","name","filename","layoutProps","MDXLayout","DefaultLayout","MDXContent","_ref","components","props","_objectWithoutProperties","_excluded","mdx","_extends","mdxType","parentName","TutorialButtons","prev","next","isMDXComponent"],"mappings":"qSAOaA,EAAe,QAAG,IAAAA,UAAAC,OAAAD,IAAAC,OAAAC,aAAAF,KAAAC,OAAAE,UAAAC,eAAAC,KAAAL,EAAA,eAAAC,OAAAK,eAAAN,EAAA,cAAAO,cAAA,EAAAC,MAAA,CAAAC,KAAA,eAAAC,SAAA,iCAC/B,MAAMC,EAAc,CAClBX,gBAEIY,EAAYC,IACH,SAASC,EAAUC,GAG/B,IAHgC,WACjCC,GAEDD,EADIE,EAAKC,YAAAH,EAAAI,GAER,OAAOC,YAACR,EAASS,YAAA,GAAKV,EAAiBM,EAAK,CAAED,WAAYA,EAAYM,QAAQ,cAG5EF,YAAA,MACE,GAAM,0BAAwB,0BAEhCA,YAAA,MACE,GAAM,yCAAuC,yCAE/CA,YAAA,4JAEAA,YAAA,UACEA,YAAA,MAAIG,WAAW,MAAI,aACjBH,YAAA,MAAIG,WAAW,MACbH,YAAA,MAAIG,WAAW,MAAI,KAAOH,YAAA,cAAYG,WAAW,MAAI,cAA4B,gCAAiCH,YAAA,cAAYG,WAAW,MAAI,mBAAiC,UAC9KH,YAAA,MAAIG,WAAW,MAAI,UAAYH,YAAA,cAAYG,WAAW,MAAI,WAAyB,qDAAsDH,YAAA,cAAYG,WAAW,MAAI,QAAsB,sBAI9LH,YAAA,MAAIG,WAAW,MAAI,UACjBH,YAAA,MAAIG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MAAA,CAAAC,KAAA,aAAAC,SAAA,iCAEDI,EAAWa,gBAAiB","file":"component---docs-tutorial-refresher-mdx-67e79a7d746867ef4fe4.js","sourcesContent":["import * as React from 'react'\n /* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsxRuntime classic */\n/* @jsx mdx */\nimport DefaultLayout from \"/home/runner/work/tanka/tanka/docs/node_modules/gatsby-theme-docz/src/base/Layout.js\";\nimport TutorialButtons from \"./TutorialButtons\";\nexport const _frontmatter = {};\nconst layoutProps = {\n _frontmatter\n};\nconst MDXLayout = DefaultLayout;\nexport default function MDXContent({\n components,\n ...props\n}) {\n return \n\n\n

{`Refresher on deploying`}

\n

{`Deploying to Kubernetes using kubectl`}

\n

{`To understand how Tanka works, it is important to know what steps are required\nfor the task of deploying Grafana and Prometheus to Kubernetes:`}

\n
    \n
  1. {`Prometheus`}\n
      \n
    • {`A `}{`Deployment`}{` must be created, to run the `}{`prom/prometheus`}{` image`}
    • \n
    • {`Also a `}{`Service`}{` is needed for Grafana to be able to connect port `}{`9090`}{` of\nPrometheus.`}
    • \n
    \n
  2. \n
  3. {`Grafana`}\n
      \n
    • {`Another `}{`Deployment`}{` is required for the Grafana server.`}
    • \n
    • {`To connect to the web interface, we will be using a `}{`Service`}{` of type\n`}{`NodePort`}{`.`}
    • \n
    \n
  4. \n
\n

{`Before taking a look how Tanka can help doing so, let's recall how to do it with\nplain `}{`kubectl`}{`.`}

\n

{`Writing the yaml`}

\n

{`kubectl`}{` expects the resources it should create in `}{`.yaml`}{` format. For Grafana\n...`}

\n
{`grafana.yaml:`}
\n
{`# Grafana server Deployment`}{`\n`}{`apiVersion`}{`:`}{` `}{`apps/v1`}{`\n`}{`kind`}{`:`}{` `}{`Deployment`}{`\n`}{`metadata`}{`:`}{`\n`}{`  `}{`name`}{`:`}{` `}{`grafana`}{`\n`}{`spec`}{`:`}{`\n`}{`  `}{`selector`}{`:`}{`\n`}{`    `}{`matchLabels`}{`:`}{`\n`}{`      `}{`name`}{`:`}{` `}{`grafana`}{`\n`}{`  `}{`template`}{`:`}{`\n`}{`    `}{`metadata`}{`:`}{`\n`}{`      `}{`labels`}{`:`}{`\n`}{`        `}{`name`}{`:`}{` `}{`grafana`}{`\n`}{`    `}{`spec`}{`:`}{`\n`}{`      `}{`containers`}{`:`}{`\n`}{`        `}{`-`}{` `}{`image`}{`:`}{` `}{`grafana/grafana`}{`\n`}{`          `}{`name`}{`:`}{` `}{`grafana`}{`\n`}{`          `}{`ports`}{`:`}{`\n`}{`            `}{`-`}{` `}{`containerPort`}{`:`}{` `}{`3000`}{`\n`}{`              `}{`name`}{`:`}{` `}{`ui`}{`\n`}{`---`}{`\n`}{`# Grafana UI Service NodePort`}{`\n`}{`apiVersion`}{`:`}{` `}{`v1`}{`\n`}{`kind`}{`:`}{` `}{`Service`}{`\n`}{`metadata`}{`:`}{`\n`}{`  `}{`labels`}{`:`}{`\n`}{`    `}{`name`}{`:`}{` `}{`grafana`}{`\n`}{`  `}{`name`}{`:`}{` `}{`grafana`}{`\n`}{`spec`}{`:`}{`\n`}{`  `}{`ports`}{`:`}{`\n`}{`    `}{`-`}{` `}{`name`}{`:`}{` `}{`grafana-ui`}{`\n`}{`      `}{`port`}{`:`}{` `}{`3000`}{`\n`}{`      `}{`targetPort`}{`:`}{` `}{`3000`}{`\n`}{`  `}{`selector`}{`:`}{`\n`}{`    `}{`name`}{`:`}{` `}{`grafana`}{`\n`}{`  `}{`type`}{`:`}{` `}{`NodePort`}
\n

{`... and for Prometheus:`}

\n
{`prometheus.yaml`}
\n
{`# Prometheus server Deployment`}{`\n`}{`apiVersion`}{`:`}{` `}{`apps/v1`}{`\n`}{`kind`}{`:`}{` `}{`Deployment`}{`\n`}{`metadata`}{`:`}{`\n`}{`  `}{`name`}{`:`}{` `}{`prometheus`}{`\n`}{`spec`}{`:`}{`\n`}{`  `}{`selector`}{`:`}{`\n`}{`    `}{`matchLabels`}{`:`}{`\n`}{`      `}{`name`}{`:`}{` `}{`prometheus`}{`\n`}{`  `}{`template`}{`:`}{`\n`}{`    `}{`metadata`}{`:`}{`\n`}{`      `}{`labels`}{`:`}{`\n`}{`        `}{`name`}{`:`}{` `}{`prometheus`}{`\n`}{`    `}{`spec`}{`:`}{`\n`}{`      `}{`containers`}{`:`}{`\n`}{`        `}{`-`}{` `}{`image`}{`:`}{` `}{`prom/prometheus`}{`\n`}{`          `}{`name`}{`:`}{` `}{`prometheus`}{`\n`}{`          `}{`ports`}{`:`}{`\n`}{`            `}{`-`}{` `}{`containerPort`}{`:`}{` `}{`9090`}{`\n`}{`              `}{`name`}{`:`}{` `}{`api`}{`\n`}{`---`}{`\n`}{`# Prometheus API Service`}{`\n`}{`apiVersion`}{`:`}{` `}{`v1`}{`\n`}{`kind`}{`:`}{` `}{`Service`}{`\n`}{`metadata`}{`:`}{`\n`}{`  `}{`labels`}{`:`}{`\n`}{`    `}{`name`}{`:`}{` `}{`prometheus`}{`\n`}{`  `}{`name`}{`:`}{` `}{`prometheus`}{`\n`}{`spec`}{`:`}{`\n`}{`  `}{`ports`}{`:`}{`\n`}{`    `}{`-`}{` `}{`name`}{`:`}{` `}{`prometheus-api`}{`\n`}{`      `}{`port`}{`:`}{` `}{`9090`}{`\n`}{`      `}{`targetPort`}{`:`}{` `}{`9090`}{`\n`}{`  `}{`selector`}{`:`}{`\n`}{`    `}{`name`}{`:`}{` `}{`prometheus`}
\n

{`That's pretty verbose, right?`}

\n

{`Even worse, there are labels and matchers (e.g. `}{`prometheus`}{`) that need to be\nexactly the same scattered across the file. It's a nightmare to debug and\nfurthermore harms readability a lot.`}

\n

{`Deploying to the cluster`}

\n

{`To actually apply those resources, copy them into `}{`.yaml`}{` files and use:`}

\n
{`$ kubectl apply -f prometheus.yaml -f grafana.yaml`}{`\n`}{`deployment.apps/grafana created`}{`\n`}{`deployment.apps/prometheus created`}{`\n`}{`service/grafana created`}{`\n`}{`service/prometheus created`}
\n

{`Checking it worked`}

\n

{`So far so good, but can we tell it actually did what we wanted? Let's test that\nGrafana can connect to Prometheus!`}

\n
{`# Temporarily forward Grafana to localhost`}{`\n`}{`kubectl port-forward deployments/grafana 8080:3000`}
\n

{`Now go to http://localhost:8080 in your browser and login using `}{`admin:admin`}{`.\nThen navigate to `}{`Connections > Data Sources > Add data source`}{`, choose\n`}{`Prometheus`}{` as type and enter `}{`http://prometheus:9090`}{` as URL. Hit\n`}{`Save & Test`}{` which should yield a big green bar telling you everything is good.`}

\n

{`Cool! This worked out well for this small example, but the `}{`.yaml`}{` files are\nhard to read and maintain. Especially when you need to deploy this exact same\nthing in `}{`dev`}{` and `}{`prod`}{` your choices are very limited.`}

\n

{`Let's explore how Tanka can help us here in the next section!`}

\n

{`Cleaning up`}

\n

{`Let's remove everything we created to start fresh with Jsonnet in the next section:`}

\n
{`$ kubectl delete -f prometheus.yaml -f grafana.yaml`}
\n\n \n\n \n
;\n}\n;\nMDXContent.isMDXComponent = true;\n "],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///./docs/tutorial/refresher.mdx"],"names":["_frontmatter","Object","isExtensible","prototype","hasOwnProperty","call","defineProperty","configurable","value","name","filename","layoutProps","MDXLayout","DefaultLayout","MDXContent","_ref","components","props","_objectWithoutProperties","_excluded","mdx","_extends","mdxType","parentName","TutorialButtons","prev","next","isMDXComponent"],"mappings":"qSAOaA,EAAe,QAAG,IAAAA,UAAAC,OAAAD,IAAAC,OAAAC,aAAAF,KAAAC,OAAAE,UAAAC,eAAAC,KAAAL,EAAA,eAAAC,OAAAK,eAAAN,EAAA,cAAAO,cAAA,EAAAC,MAAA,CAAAC,KAAA,eAAAC,SAAA,iCAC/B,MAAMC,EAAc,CAClBX,gBAEIY,EAAYC,IACH,SAASC,EAAUC,GAG/B,IAHgC,WACjCC,GAEDD,EADIE,EAAKC,YAAAH,EAAAI,GAER,OAAOC,YAACR,EAASS,YAAA,GAAKV,EAAiBM,EAAK,CAAED,WAAYA,EAAYM,QAAQ,cAG5EF,YAAA,MACE,GAAM,0BAAwB,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,gGACAA,YAAA,OACE,UAAa,yCACb,gBAAiB,QAChBA,YAAA,QAAMG,WAAW,MAChB,UAAa,yBACZH,YAAA,QAAMG,WAAW,OAChB,UAAa,yBACZH,YAAA,QAAMG,WAAW,OAChB,UAAa,QAAM,0DAG3BH,YAACI,IAAe,CAACC,KAAK,qBAAqBC,KAAK,oBAAoBJ,QAAQ,oBAE5EF,YAAA,SACE,UAAa,2BAAyB,glCA6B3C,IAAAN,UAAAb,OAAAa,IAAAb,OAAAC,aAAAY,KAAAb,OAAAE,UAAAC,eAAAC,KAAAS,EAAA,eAAAb,OAAAK,eAAAQ,EAAA,cAAAP,cAAA,EAAAC,MAAA,CAAAC,KAAA,aAAAC,SAAA,iCAEDI,EAAWa,gBAAiB","file":"component---docs-tutorial-refresher-mdx-81bba2a6cc6987e2c96b.js","sourcesContent":["import * as React from 'react'\n /* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsxRuntime classic */\n/* @jsx mdx */\nimport DefaultLayout from \"/home/runner/work/tanka/tanka/docs/node_modules/gatsby-theme-docz/src/base/Layout.js\";\nimport TutorialButtons from \"./TutorialButtons\";\nexport const _frontmatter = {};\nconst layoutProps = {\n _frontmatter\n};\nconst MDXLayout = DefaultLayout;\nexport default function MDXContent({\n components,\n ...props\n}) {\n return \n\n\n

{`Refresher on deploying`}

\n

{`Deploying to Kubernetes using kubectl`}

\n

{`To understand how Tanka works, it is important to know what steps are required\nfor the task of deploying Grafana and Prometheus to Kubernetes:`}

\n
    \n
  1. {`Prometheus`}\n
      \n
    • {`A `}{`Deployment`}{` must be created, to run the `}{`prom/prometheus`}{` image`}
    • \n
    • {`Also a `}{`Service`}{` is needed for Grafana to be able to connect port `}{`9090`}{` of\nPrometheus.`}
    • \n
    \n
  2. \n
  3. {`Grafana`}\n
      \n
    • {`Another `}{`Deployment`}{` is required for the Grafana server.`}
    • \n
    • {`To connect to the web interface, we will be using a `}{`Service`}{` of type\n`}{`NodePort`}{`.`}
    • \n
    \n
  4. \n
\n

{`Before taking a look how Tanka can help doing so, let's recall how to do it with\nplain `}{`kubectl`}{`.`}

\n

{`Writing the yaml`}

\n

{`kubectl`}{` expects the resources it should create in `}{`.yaml`}{` format. For Grafana\n...`}

\n
{`grafana.yaml:`}
\n
{`# Grafana server Deployment`}{`\n`}{`apiVersion`}{`:`}{` `}{`apps/v1`}{`\n`}{`kind`}{`:`}{` `}{`Deployment`}{`\n`}{`metadata`}{`:`}{`\n`}{`  `}{`name`}{`:`}{` `}{`grafana`}{`\n`}{`spec`}{`:`}{`\n`}{`  `}{`selector`}{`:`}{`\n`}{`    `}{`matchLabels`}{`:`}{`\n`}{`      `}{`name`}{`:`}{` `}{`grafana`}{`\n`}{`  `}{`template`}{`:`}{`\n`}{`    `}{`metadata`}{`:`}{`\n`}{`      `}{`labels`}{`:`}{`\n`}{`        `}{`name`}{`:`}{` `}{`grafana`}{`\n`}{`    `}{`spec`}{`:`}{`\n`}{`      `}{`containers`}{`:`}{`\n`}{`        `}{`-`}{` `}{`image`}{`:`}{` `}{`grafana/grafana`}{`\n`}{`          `}{`name`}{`:`}{` `}{`grafana`}{`\n`}{`          `}{`ports`}{`:`}{`\n`}{`            `}{`-`}{` `}{`containerPort`}{`:`}{` `}{`3000`}{`\n`}{`              `}{`name`}{`:`}{` `}{`ui`}{`\n`}{`---`}{`\n`}{`# Grafana UI Service NodePort`}{`\n`}{`apiVersion`}{`:`}{` `}{`v1`}{`\n`}{`kind`}{`:`}{` `}{`Service`}{`\n`}{`metadata`}{`:`}{`\n`}{`  `}{`labels`}{`:`}{`\n`}{`    `}{`name`}{`:`}{` `}{`grafana`}{`\n`}{`  `}{`name`}{`:`}{` `}{`grafana`}{`\n`}{`spec`}{`:`}{`\n`}{`  `}{`ports`}{`:`}{`\n`}{`    `}{`-`}{` `}{`name`}{`:`}{` `}{`grafana-ui`}{`\n`}{`      `}{`port`}{`:`}{` `}{`3000`}{`\n`}{`      `}{`targetPort`}{`:`}{` `}{`3000`}{`\n`}{`  `}{`selector`}{`:`}{`\n`}{`    `}{`name`}{`:`}{` `}{`grafana`}{`\n`}{`  `}{`type`}{`:`}{` `}{`NodePort`}
\n

{`... and for Prometheus:`}

\n
{`prometheus.yaml`}
\n
{`# Prometheus server Deployment`}{`\n`}{`apiVersion`}{`:`}{` `}{`apps/v1`}{`\n`}{`kind`}{`:`}{` `}{`Deployment`}{`\n`}{`metadata`}{`:`}{`\n`}{`  `}{`name`}{`:`}{` `}{`prometheus`}{`\n`}{`spec`}{`:`}{`\n`}{`  `}{`selector`}{`:`}{`\n`}{`    `}{`matchLabels`}{`:`}{`\n`}{`      `}{`name`}{`:`}{` `}{`prometheus`}{`\n`}{`  `}{`template`}{`:`}{`\n`}{`    `}{`metadata`}{`:`}{`\n`}{`      `}{`labels`}{`:`}{`\n`}{`        `}{`name`}{`:`}{` `}{`prometheus`}{`\n`}{`    `}{`spec`}{`:`}{`\n`}{`      `}{`containers`}{`:`}{`\n`}{`        `}{`-`}{` `}{`image`}{`:`}{` `}{`prom/prometheus`}{`\n`}{`          `}{`name`}{`:`}{` `}{`prometheus`}{`\n`}{`          `}{`ports`}{`:`}{`\n`}{`            `}{`-`}{` `}{`containerPort`}{`:`}{` `}{`9090`}{`\n`}{`              `}{`name`}{`:`}{` `}{`api`}{`\n`}{`---`}{`\n`}{`# Prometheus API Service`}{`\n`}{`apiVersion`}{`:`}{` `}{`v1`}{`\n`}{`kind`}{`:`}{` `}{`Service`}{`\n`}{`metadata`}{`:`}{`\n`}{`  `}{`labels`}{`:`}{`\n`}{`    `}{`name`}{`:`}{` `}{`prometheus`}{`\n`}{`  `}{`name`}{`:`}{` `}{`prometheus`}{`\n`}{`spec`}{`:`}{`\n`}{`  `}{`ports`}{`:`}{`\n`}{`    `}{`-`}{` `}{`name`}{`:`}{` `}{`prometheus-api`}{`\n`}{`      `}{`port`}{`:`}{` `}{`9090`}{`\n`}{`      `}{`targetPort`}{`:`}{` `}{`9090`}{`\n`}{`  `}{`selector`}{`:`}{`\n`}{`    `}{`name`}{`:`}{` `}{`prometheus`}
\n

{`That's pretty verbose, right?`}

\n

{`Even worse, there are labels and matchers (e.g. `}{`prometheus`}{`) that need to be\nexactly the same scattered across the file. It's a nightmare to debug and\nfurthermore harms readability a lot.`}

\n

{`Deploying to the cluster`}

\n

{`To actually apply those resources, copy them into `}{`.yaml`}{` files and use:`}

\n
{`$ kubectl apply -f prometheus.yaml -f grafana.yaml`}{`\n`}{`deployment.apps/grafana created`}{`\n`}{`deployment.apps/prometheus created`}{`\n`}{`service/grafana created`}{`\n`}{`service/prometheus created`}
\n

{`Checking it worked`}

\n

{`So far so good, but can we tell it actually did what we wanted? Let's test that\nGrafana can connect to Prometheus!`}

\n
{`# Temporarily forward Grafana to localhost`}{`\n`}{`kubectl port-forward deployments/grafana 8080:3000`}
\n

{`Now go to http://localhost:8080 in your browser and login using `}{`admin:admin`}{`.\nThen navigate to `}{`Connections > Data sources > Add new data source`}{`, choose\n`}{`Prometheus`}{` as type and enter `}{`http://prometheus:9090`}{` as URL. Hit\n`}{`Save & Test`}{` which should yield a big green bar telling you everything is good.`}

\n

{`Cool! This worked out well for this small example, but the `}{`.yaml`}{` files are\nhard to read and maintain. Especially when you need to deploy this exact same\nthing in `}{`dev`}{` and `}{`prod`}{` your choices are very limited.`}

\n

{`Let's explore how Tanka can help us here in the next section!`}

\n

{`Cleaning up`}

\n

{`Let's remove everything we created to start fresh with Jsonnet in the next section:`}

\n
{`$ kubectl delete -f prometheus.yaml -f grafana.yaml`}
\n\n \n\n \n
;\n}\n;\nMDXContent.isMDXComponent = true;\n "],"sourceRoot":""} \ No newline at end of file diff --git a/pr-preview/pr-974/config/index.html b/pr-preview/pr-974/config/index.html index 639a4b11a..154b3f2c5 100644 --- a/pr-preview/pr-974/config/index.html +++ b/pr-preview/pr-974/config/index.html @@ -1,4 +1,4 @@ -Configuration Reference | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Configuration ReferenceFile formatJsonnet accessDirectory structureEnvironment variablesCommand-line completionDiff strategiesNamespacesFormatting
Frequently asked questionsKnown issues

Configuration Reference

Tanka's behavior can be customized per Environment using a file called spec.json

File format

{
+Configuration Reference | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Configuration ReferenceFile formatJsonnet accessDirectory structureEnvironment variablesCommand-line completionDiff strategiesNamespacesFormatting
Frequently asked questionsKnown issues

Configuration Reference

Tanka's behavior can be customized per Environment using a file called spec.json

File format

{
   // Config format revision. Currently only "v1alpha1"
   "apiVersion": "v1alpha1",
   // Always "Environment". Reserved for future use
@@ -51,4 +51,4 @@
 .material-theme-darker .mtki { font-style: italic; }
 .material-theme-darker .mtkb { font-weight: bold; }
 .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }
-
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/diff-strategy/index.html b/pr-preview/pr-974/diff-strategy/index.html index e644147ee..effc29d94 100644 --- a/pr-preview/pr-974/diff-strategy/index.html +++ b/pr-preview/pr-974/diff-strategy/index.html @@ -1,4 +1,4 @@ -Diff strategies | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Configuration ReferenceDirectory structureEnvironment variablesCommand-line completionDiff strategiesNativeSubsetExternal diff utilitiesNamespacesFormatting
Frequently asked questionsKnown issues

Diff Strategies

Tanka supports two different ways of computing differences between the local +Diff strategies | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Configuration ReferenceDirectory structureEnvironment variablesCommand-line completionDiff strategiesNativeSubsetExternal diff utilitiesNamespacesFormatting
Frequently asked questionsKnown issues

Diff Strategies

Tanka supports two different ways of computing differences between the local configuration and the live cluster state: Either native kubectl diff -f - is used, which gives the best possible results, but is only possible for clusters with @@ -61,4 +61,4 @@ .material-theme-darker .mtki { font-style: italic; } .material-theme-darker .mtkb { font-weight: bold; } .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; } -

\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/directory-structure/index.html b/pr-preview/pr-974/directory-structure/index.html index c42b993dd..eb4e2fe9f 100644 --- a/pr-preview/pr-974/directory-structure/index.html +++ b/pr-preview/pr-974/directory-structure/index.html @@ -1,4 +1,4 @@ -Directory structure | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Configuration ReferenceDirectory structureEnvironmentsRoot and BaseLibrariesEnvironment variablesCommand-line completionDiff strategiesNamespacesFormatting
Frequently asked questionsKnown issues

Directory structure

Tanka uses the following directories and special files:

. # the project (<rootDir>)
+Directory structure | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Configuration ReferenceDirectory structureEnvironmentsRoot and BaseLibrariesEnvironment variablesCommand-line completionDiff strategiesNamespacesFormatting
Frequently asked questionsKnown issues

Directory structure

Tanka uses the following directories and special files:

. # the project (<rootDir>)
 ├── environments # code defining clusters
 │   └── default # <baseDir>
 │       ├── main.jsonnet # starting point of the Jsonnet compilation
@@ -62,4 +62,4 @@
 .material-theme-darker .mtki { font-style: italic; }
 .material-theme-darker .mtkb { font-weight: bold; }
 .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }
-
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/env-vars/index.html b/pr-preview/pr-974/env-vars/index.html index 90e8a2859..70efe6da4 100644 --- a/pr-preview/pr-974/env-vars/index.html +++ b/pr-preview/pr-974/env-vars/index.html @@ -1,7 +1,7 @@ -Environment variables | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Environment Variables

TANKA_JB_PATH

Description: Path to the jb tool executable
+Environment variables | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Environment Variables

TANKA_JB_PATH

Description: Path to the jb tool executable
Default: $PATH/jb

TANKA_KUBECTL_PATH

Description: Path to the kubectl tool executable
Default: $PATH/kubectl

TANKA_KUBECTL_TRACE

Description: Print all calls to kubectl
Default: false

TANKA_HELM_PATH

Description: Path to the helm executable
Default: $PATH/helm

TANKA_KUSTOMIZE_PATH

Description: Path to the kustomize executable
Default: $PATH/kustomize

PAGER

Description: Pager to use when displaying output. Set to an empty string to disable paging. -Default: less --RAW-CONTROL-CHARS --quit-if-one-screen --no-init

\ No newline at end of file +Default: less --RAW-CONTROL-CHARS --quit-if-one-screen --no-init

\ No newline at end of file diff --git a/pr-preview/pr-974/exporting/index.html b/pr-preview/pr-974/exporting/index.html index 401f49cec..8b6beeafc 100644 --- a/pr-preview/pr-974/exporting/index.html +++ b/pr-preview/pr-974/exporting/index.html @@ -1,4 +1,4 @@ -Exporting as YAML | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
Garbage collectionHelm supportKustomize supportOutput filteringExporting as YAMLFilenamesMultiple environmentsPerformance featuresInline environmentsServer-Side Apply
References
Frequently asked questionsKnown issues

Exporting as YAML

Tanka provides you with a day-to-day workflow for working with Kubernetes clusters:

  • tk show for quickly checking the YAML representation looks good
  • tk diff to ensure your changes will behave like they should
  • tk apply makes it happen

However sometimes it can be required to integrate with other tooling that does +Exporting as YAML | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
Garbage collectionHelm supportKustomize supportOutput filteringExporting as YAMLFilenamesMultiple environmentsPerformance featuresInline environmentsServer-Side Apply
References
Frequently asked questionsKnown issues

Exporting as YAML

Tanka provides you with a day-to-day workflow for working with Kubernetes clusters:

  • tk show for quickly checking the YAML representation looks good
  • tk diff to ensure your changes will behave like they should
  • tk apply makes it happen

However sometimes it can be required to integrate with other tooling that does only support .yaml files.

For that case, tk export can be used:

#           <outputDir> <environment>
 $ tk export promtail/   environments/promtail

Note: The arguments flipped in v0.14.0, the <outputDir> comes first now.

This will create a separate .yaml file for each Kubernetes resource included in your Jsonnet.

Filenames

Tanka by default uses the following pattern:

${apiVersion}.${kind}-${metadata.name}.yaml
 
@@ -53,4 +53,4 @@
 .material-theme-darker .mtki { font-style: italic; }
 .material-theme-darker .mtkb { font-weight: bold; }
 .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }
-
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/faq/index.html b/pr-preview/pr-974/faq/index.html index 8b317eb99..8bf0c61b1 100644 --- a/pr-preview/pr-974/faq/index.html +++ b/pr-preview/pr-974/faq/index.html @@ -1,4 +1,4 @@ -Frequently asked questions | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsWhat is Jsonnet?How is this different from ksonnet?What about kubecfg ?Why not Helm?Known issues

Frequently asked questions

What is Jsonnet?

Jsonnet is a data templating language, originally created by Google.

It is a superset of JSON, which adds common structures from full programming +Frequently asked questions | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsWhat is Jsonnet?How is this different from ksonnet?What about kubecfg ?Why not Helm?Known issues

Frequently asked questions

What is Jsonnet?

Jsonnet is a data templating language, originally created by Google.

It is a superset of JSON, which adds common structures from full programming languages to data modeling. Because it being a superset of JSON and ultimately always compiling to JSON, it is guaranteed that the output will be valid JSON (or YAML).

By allowing functions and imports, rich abstraction is possible, even across @@ -20,4 +20,4 @@ adequate solution for edge cases. If I wanted to set some parameters that are not already implemented by the Chart, I have no choice but to modify the Chart first.

Jsonnet on the other hand got you covered by supporting mixing (patching, -deep-merging) objects on top of the libraries output if required.

\ No newline at end of file +deep-merging) objects on top of the libraries output if required.

\ No newline at end of file diff --git a/pr-preview/pr-974/formatting/index.html b/pr-preview/pr-974/formatting/index.html index f97f997ca..d851d6513 100644 --- a/pr-preview/pr-974/formatting/index.html +++ b/pr-preview/pr-974/formatting/index.html @@ -1,4 +1,4 @@ -Formatting | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

File Formatting

Tanka supports formatting for all jsonnet and libsonnet files using the tk fmt command.

By default, the command excludes all vendor directories.

# Run for current and child directories. Run this in the root of the project to format all your files.
+Formatting | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

File Formatting

Tanka supports formatting for all jsonnet and libsonnet files using the tk fmt command.

By default, the command excludes all vendor directories.

# Run for current and child directories. Run this in the root of the project to format all your files.
 tk fmt .
 
 # Format a single file (myFile.jsonnet)
@@ -34,4 +34,4 @@
 .material-theme-darker .mtki { font-style: italic; }
 .material-theme-darker .mtkb { font-weight: bold; }
 .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }
-
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/garbage-collection/index.html b/pr-preview/pr-974/garbage-collection/index.html index 570497c20..cf0bd2099 100644 --- a/pr-preview/pr-974/garbage-collection/index.html +++ b/pr-preview/pr-974/garbage-collection/index.html @@ -1,4 +1,4 @@ -Garbage collection | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Garbage collection

Tanka can automatically delete resources from your cluster once you remove them +Garbage collection | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Garbage collection

Tanka can automatically delete resources from your cluster once you remove them from Jsonnet.

Note: This feature is experimental. Please report problems at https://github.com/grafana/tanka/issues.

To accomplish this, it appends the tanka.dev/environment: <hash> label to each created resource. This is used to identify those which are missing from the local state in the future.

Note: The label value changed from the <name> to a <hash> in v0.15.0.

Because the label causes a diff for every single object in your cluster and @@ -34,4 +34,4 @@ .material-theme-darker .mtki { font-style: italic; } .material-theme-darker .mtkb { font-weight: bold; } .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; } -

\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/helm/index.html b/pr-preview/pr-974/helm/index.html index fc71fca42..8f1200891 100644 --- a/pr-preview/pr-974/helm/index.html +++ b/pr-preview/pr-974/helm/index.html @@ -1,4 +1,4 @@ -Helm support | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
Garbage collectionHelm supportConsuming Helm Charts from JsonnetVendoring Helm ChartsTroubleshootingKustomize supportOutput filteringExporting as YAMLInline environmentsServer-Side Apply
References
Frequently asked questionsKnown issues

Helm Support

The Helm project is the biggest ecosystem of high quality, +Helm support | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
Garbage collectionHelm supportConsuming Helm Charts from JsonnetVendoring Helm ChartsTroubleshootingKustomize supportOutput filteringExporting as YAMLInline environmentsServer-Side Apply
References
Frequently asked questionsKnown issues

Helm Support

The Helm project is the biggest ecosystem of high quality, well maintained application definitions for Kubernetes.

Even though Grafana Tanka uses the Jsonnet language for resource definition, you can still consume Helm resources, as described below.

Consuming Helm Charts from Jsonnet

Helm support is provided using the github.com/grafana/jsonnet-libs/tanka-util @@ -138,4 +138,4 @@ .material-theme-darker .mtki { font-style: italic; } .material-theme-darker .mtkb { font-weight: bold; } .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; } -

\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/index.html b/pr-preview/pr-974/index.html index 7f4613550..cd09fab68 100644 --- a/pr-preview/pr-974/index.html +++ b/pr-preview/pr-974/index.html @@ -1,7 +1,7 @@ Introduction | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionHighlightsInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Define. Reuse. Override.

Grafana Tanka is the robust configuration utility for your Kubernetes cluster, powered by the unique Jsonnet language

InstallTutorial
local k = import "k.libsonnet";
+"/>
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionHighlightsInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Define. Reuse. Override.

Grafana Tanka is the robust configuration utility for your Kubernetes cluster, powered by the unique Jsonnet language

InstallTutorial
local k = import "k.libsonnet";
 
 {
     grafana: k.apps.v1.deployment.new(
@@ -38,4 +38,4 @@
 .material-theme-darker .mtki { font-style: italic; }
 .material-theme-darker .mtkb { font-weight: bold; }
 .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }
-
Kubernetes Deployment. That's all it takes.

Highlights

Clean

The Jsonnet language expresses your Kubernetes apps more clearly than YAML ever did

Reusable

Build application libraries, import them anywhere and even share them on GitHub!

Concise

Using the Kubernetes library, you will never see boilerplate again!

Confidence

Stop guessing and use powerful diff to know the exact changes in advance

Production ready

Tanka deploys Grafana Cloud and many more production setups

Open Source

Just like the popular Grafana and Loki projects, Tanka is fully open-source
\ No newline at end of file +
Kubernetes Deployment. That's all it takes.

Highlights

Clean

The Jsonnet language expresses your Kubernetes apps more clearly than YAML ever did

Reusable

Build application libraries, import them anywhere and even share them on GitHub!

Concise

Using the Kubernetes library, you will never see boilerplate again!

Confidence

Stop guessing and use powerful diff to know the exact changes in advance

Production ready

Tanka deploys Grafana Cloud and many more production setups

Open Source

Just like the popular Grafana and Loki projects, Tanka is fully open-source
\ No newline at end of file diff --git a/pr-preview/pr-974/inline-environments/index.html b/pr-preview/pr-974/inline-environments/index.html index 76dd23104..5a7afe5e4 100644 --- a/pr-preview/pr-974/inline-environments/index.html +++ b/pr-preview/pr-974/inline-environments/index.html @@ -1,4 +1,4 @@ -Inline environments | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
Garbage collectionHelm supportKustomize supportOutput filteringExporting as YAMLInline environmentsConverting to an inline environmentUse case: variable apiServerUse case: consistent inline environmentsCaveatsServer-Side Apply
References
Frequently asked questionsKnown issues

Inline environments

Inline environments is the practice of defining the environment's config inline +Inline environments | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
Garbage collectionHelm supportKustomize supportOutput filteringExporting as YAMLInline environmentsConverting to an inline environmentUse case: variable apiServerUse case: consistent inline environmentsCaveatsServer-Side Apply
References
Frequently asked questionsKnown issues

Inline environments

Inline environments is the practice of defining the environment's config inline for evaluation at runtime as opposed to configuring it statically in spec.json.

The general take away is:

  • spec.json will no longer be used
  • main.jsonnet is expected to render a tanka.dev/Environment object
  • this object is expected to hold Kubernetes objects at .data

Converting to an inline environment

Converting a traditional spec.json environment into an inline environment is quite straight forward. Based on the example from Using Jsonnet:

The directory structure:

├── environments
@@ -116,4 +116,4 @@
 .material-theme-darker .mtki { font-style: italic; }
 .material-theme-darker .mtkb { font-weight: bold; }
 .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }
-
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/install/index.html b/pr-preview/pr-974/install/index.html index f374f394c..5df9c1671 100644 --- a/pr-preview/pr-974/install/index.html +++ b/pr-preview/pr-974/install/index.html @@ -1,4 +1,4 @@ -Installation | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallationTankaJsonnet Bundler
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Installation

Tanka is distributed as a single binary called tk. It already includes the Jsonnet compiler, but requires some tools to be available:

  • kubectl: Tanka +Installation | Tanka
    That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
    Edit page
    IntroductionInstallationTankaJsonnet Bundler
    Tutorial
    Writing Jsonnet
    Libraries
    Advanced features
    References
    Frequently asked questionsKnown issues

    Installation

    Tanka is distributed as a single binary called tk. It already includes the Jsonnet compiler, but requires some tools to be available:

    • kubectl: Tanka uses kubectl to communicate to your cluster. This means kubectl must be available somewhere on your $PATH. If you ever have worked with Kubernetes before, this should be the case anyways.
    • diff: To compute differences, standard UNIX diff(1) is required.
    • (recommended) jb: #Jsonnet Bundler, the Jsonnet package @@ -58,4 +58,4 @@ .material-theme-darker .mtki { font-style: italic; } .material-theme-darker .mtkb { font-weight: bold; } .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; } -
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/jsonnet/injecting-values/index.html b/pr-preview/pr-974/jsonnet/injecting-values/index.html index dc366f59a..2590b483c 100644 --- a/pr-preview/pr-974/jsonnet/injecting-values/index.html +++ b/pr-preview/pr-974/jsonnet/injecting-values/index.html @@ -1,4 +1,4 @@ -Injecting Values | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Syntax overviewmain.jsonnetNative FunctionsInjecting ValuesJSON filesExternal variablesTop Level Arguments
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Injecting Values

Sometimes it might be required to pass externally acquired data into Jsonnet.

There are three ways of doing so:

  1. JSON files
  2. External variables
  3. Top level arguments

Also check out the official Jsonnet docs on this +Injecting Values | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Syntax overviewmain.jsonnetNative FunctionsInjecting ValuesJSON filesExternal variablesTop Level Arguments
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Injecting Values

Sometimes it might be required to pass externally acquired data into Jsonnet.

There are three ways of doing so:

  1. JSON files
  2. External variables
  3. Top level arguments

Also check out the official Jsonnet docs on this topic.

JSON files

Jsonnet is a superset of JSON, it treats any JSON as valid Jsonnet. Because many systems can be told to output their data in JSON format, this provides a pretty good interface between those.

For example, your build tooling like make could acquire secrets from systems such as @@ -53,4 +53,4 @@ .material-theme-darker .mtki { font-style: italic; } .material-theme-darker .mtkb { font-weight: bold; } .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; } -

\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/jsonnet/main/index.html b/pr-preview/pr-974/jsonnet/main/index.html index 5e4f88378..34f065941 100644 --- a/pr-preview/pr-974/jsonnet/main/index.html +++ b/pr-preview/pr-974/jsonnet/main/index.html @@ -1,4 +1,4 @@ -main.jsonnet | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Syntax overviewmain.jsonnetDeeply nested object (Recommended)ArrayNative FunctionsInjecting Values
Libraries
Advanced features
References
Frequently asked questionsKnown issues

main.jsonnet

The most important file is called main.jsonnet, because this is where Tanka +main.jsonnet | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Syntax overviewmain.jsonnetDeeply nested object (Recommended)ArrayNative FunctionsInjecting Values
Libraries
Advanced features
References
Frequently asked questionsKnown issues

main.jsonnet

The most important file is called main.jsonnet, because this is where Tanka invokes the Jsonnet compiler. Every single line of Jsonnet, including imports, functions and whatnot is then evaluated until a single, very big JSON object is left.
@@ -96,4 +96,4 @@ .material-theme-darker .mtki { font-style: italic; } .material-theme-darker .mtkb { font-weight: bold; } .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; } -

\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/jsonnet/native/index.html b/pr-preview/pr-974/jsonnet/native/index.html index 32ab56242..b5462f92a 100644 --- a/pr-preview/pr-974/jsonnet/native/index.html +++ b/pr-preview/pr-974/jsonnet/native/index.html @@ -1,4 +1,4 @@ -Native Functions | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Syntax overviewmain.jsonnetNative Functionssha256parseJsonparseYamlmanifestJsonFromJsonmanifestYamlFromJsonescapeStringRegexregexMatchregexSubstInjecting Values
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Native Functions

Tanka extends Jsonnet using native functions, offering additional functionality not yet available in the standard library.

To use them in your code, you need to access them using std.native from the standard library:

{
+Native Functions | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Syntax overviewmain.jsonnetNative Functionssha256parseJsonparseYamlmanifestJsonFromJsonmanifestYamlFromJsonescapeStringRegexregexMatchregexSubstInjecting Values
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Native Functions

Tanka extends Jsonnet using native functions, offering additional functionality not yet available in the standard library.

To use them in your code, you need to access them using std.native from the standard library:

{
   someField:  std.native('<name>')(<arguments>),
 }

std.native takes the native function's name as a string argument and returns a function, which is called using the second set of parentheses.

sha256

Signature

sha256(string str) string

sha256 computes the SHA256 sum of the given string.

Examples

{
   sum: std.native('sha256')('Hello, World!'),
@@ -79,4 +79,4 @@
 .material-theme-darker .mtki { font-style: italic; }
 .material-theme-darker .mtkb { font-weight: bold; }
 .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }
-
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/jsonnet/overview/index.html b/pr-preview/pr-974/jsonnet/overview/index.html index b447eba70..2b9bf46a5 100644 --- a/pr-preview/pr-974/jsonnet/overview/index.html +++ b/pr-preview/pr-974/jsonnet/overview/index.html @@ -1,4 +1,4 @@ -Syntax overview | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Syntax overviewSyntaxAbstractionStandard libraryConditionalsReferencesmain.jsonnetNative FunctionsInjecting Values
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Language overview

Jsonnet is the data templating language Tanka uses for +Syntax overview | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Syntax overviewSyntaxAbstractionStandard libraryConditionalsReferencesmain.jsonnetNative FunctionsInjecting Values
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Language overview

Jsonnet is the data templating language Tanka uses for expressing what shall be deployed to your Kubernetes cluster. Understanding Jsonnet is crucial to using Tanka effectively.

This page covers the Jsonnet language itself. For more information on how to use Jsonnet with Kubernetes, see the tutorial. There's @@ -97,4 +97,4 @@ .material-theme-darker .mtki { font-style: italic; } .material-theme-darker .mtkb { font-weight: bold; } .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; } -

\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/known-issues/index.html b/pr-preview/pr-974/known-issues/index.html index 786942e08..fcb71b36e 100644 --- a/pr-preview/pr-974/known-issues/index.html +++ b/pr-preview/pr-974/known-issues/index.html @@ -1,4 +1,4 @@ -Known issues | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Known Issues

Below is a list of common errors and how to address them.

Evaluating jsonnet: RUNTIME ERROR: Undefined external variable: __ksonnet/components

When migrating from ksonnet, this error might occur, because Tanka does not +Known issues | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Known Issues

Below is a list of common errors and how to address them.

Evaluating jsonnet: RUNTIME ERROR: Undefined external variable: __ksonnet/components

When migrating from ksonnet, this error might occur, because Tanka does not provide the global __ksonnet variable, nor does it strictly have the concept of components. You will need to use the plain Jsonnet import feature instead. Note that this @@ -39,4 +39,4 @@ .material-theme-darker .mtki { font-style: italic; } .material-theme-darker .mtkb { font-weight: bold; } .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; } -

\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/kustomize/index.html b/pr-preview/pr-974/kustomize/index.html index c740ac386..985ea4800 100644 --- a/pr-preview/pr-974/kustomize/index.html +++ b/pr-preview/pr-974/kustomize/index.html @@ -1,4 +1,4 @@ -Kustomize support | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
Garbage collectionHelm supportKustomize supportConsuming a Kustomization from JsonnetWorking with KustomizeTroubleshootingOutput filteringExporting as YAMLInline environmentsServer-Side Apply
References
Frequently asked questionsKnown issues

Kustomize Support

Kustomize provides a solution for customizing Kubernetes +Kustomize support | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
Garbage collectionHelm supportKustomize supportConsuming a Kustomization from JsonnetWorking with KustomizeTroubleshootingOutput filteringExporting as YAMLInline environmentsServer-Side Apply
References
Frequently asked questionsKnown issues

Kustomize Support

Kustomize provides a solution for customizing Kubernetes manifests in YAML.

Even though Grafana Tanka uses the Jsonnet language for resource definition, you can still consume kustomizations, as described below.

Warning: Keep in mind this feature is considered EXPERIMENTAL

Consuming a Kustomization from Jsonnet

Kustomize support is provided using the github.com/grafana/jsonnet-libs/tanka-util @@ -66,4 +66,4 @@ .material-theme-darker .mtki { font-style: italic; } .material-theme-darker .mtkb { font-weight: bold; } .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; } -

\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/libraries/import-paths/index.html b/pr-preview/pr-974/libraries/import-paths/index.html index 6134e7835..706394a2a 100644 --- a/pr-preview/pr-974/libraries/import-paths/index.html +++ b/pr-preview/pr-974/libraries/import-paths/index.html @@ -1,2 +1,2 @@ -Import paths | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Import paths

When using import or importstr, Tanka considers the following directories to -find a suitable file for that specific import:

RankPathPurpose
4<baseDir>The directory of your environment, e.g. /environments/default.
Put things that belong to this very environment here.
3/libProject-global libraries, that are used in multiple environments, but are specific to this project.
2<baseDir>/vendorPer-environment vendor, can be used for vendor overriding
1/vendorGlobal vendor, holds external libraries installed using jb.

Note:

  • If a file occurs in multiple paths, the one with the highest rank will be chosen.
  • / in above table means <rootDir>, which is your project root.
\ No newline at end of file +Import paths | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Import paths

When using import or importstr, Tanka considers the following directories to +find a suitable file for that specific import:

RankPathPurpose
4<baseDir>The directory of your environment, e.g. /environments/default.
Put things that belong to this very environment here.
3/libProject-global libraries, that are used in multiple environments, but are specific to this project.
2<baseDir>/vendorPer-environment vendor, can be used for vendor overriding
1/vendorGlobal vendor, holds external libraries installed using jb.

Note:

  • If a file occurs in multiple paths, the one with the highest rank will be chosen.
  • / in above table means <rootDir>, which is your project root.
\ No newline at end of file diff --git a/pr-preview/pr-974/libraries/install-publish/index.html b/pr-preview/pr-974/libraries/install-publish/index.html index 12db311e3..74519ba34 100644 --- a/pr-preview/pr-974/libraries/install-publish/index.html +++ b/pr-preview/pr-974/libraries/install-publish/index.html @@ -1,4 +1,4 @@ -Installing and publishing | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Import pathsInstalling and publishingInstall a libraryPublish to Git(Hub)Overriding
Advanced features
References
Frequently asked questionsKnown issues

Installing and publishing

The tool for dealing with libraries is +Installing and publishing | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Import pathsInstalling and publishingInstall a libraryPublish to Git(Hub)Overriding
Advanced features
References
Frequently asked questionsKnown issues

Installing and publishing

The tool for dealing with libraries is jsonnet-bundler. It can install packages from any git source using ssh and GitHub over https.

Install a library

To install a library from GitHub, use one of the following:

$ jb install github.com/<user>/<repo>
 $ jb install github.com/<user>/<repo>/<subdir>
@@ -32,4 +32,4 @@
 .material-theme-darker .mtki { font-style: italic; }
 .material-theme-darker .mtkb { font-weight: bold; }
 .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }
-
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/libraries/overriding/index.html b/pr-preview/pr-974/libraries/overriding/index.html index 95e2e88db..d63303450 100644 --- a/pr-preview/pr-974/libraries/overriding/index.html +++ b/pr-preview/pr-974/libraries/overriding/index.html @@ -1,4 +1,4 @@ -Overriding | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Import pathsInstalling and publishingOverridingShadowingPer environment
Advanced features
References
Frequently asked questionsKnown issues

Overriding vendor

The vendor directory is immutable in its nature. You can't and should never +Overriding | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Import pathsInstalling and publishingOverridingShadowingPer environment
Advanced features
References
Frequently asked questionsKnown issues

Overriding vendor

The vendor directory is immutable in its nature. You can't and should never modify any files inside of it, jb will revert those changes on the next run anyway.

Nevertheless, it can sometimes become required to add changes there, e.g. if an upstream library contains a bug that needs to be fixed immediately, without waiting for the upstream maintainer to review it.

Shadowing

Because import paths are ranked in Tanka, you can use @@ -58,4 +58,4 @@ .material-theme-darker .mtki { font-style: italic; } .material-theme-darker .mtkb { font-weight: bold; } .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; } -

\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/namespaces/index.html b/pr-preview/pr-974/namespaces/index.html index f01e82f53..27f034263 100644 --- a/pr-preview/pr-974/namespaces/index.html +++ b/pr-preview/pr-974/namespaces/index.html @@ -1,4 +1,4 @@ -Namespaces | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Configuration ReferenceDirectory structureEnvironment variablesCommand-line completionDiff strategiesNamespacesDefault namespacesCluster-wide resourcesFormatting
Frequently asked questionsKnown issues

Namespaces

When using Tanka, namespaces are handled slightly different compared to +Namespaces | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Configuration ReferenceDirectory structureEnvironment variablesCommand-line completionDiff strategiesNamespacesDefault namespacesCluster-wide resourcesFormatting
Frequently asked questionsKnown issues

Namespaces

When using Tanka, namespaces are handled slightly different compared to kubectl, because environments offer more granular control than contexts used by kubectl.

Default namespaces

In the spec.json of each environment, you can set the spec.namespace field, which is the default namespace. The default namespace is @@ -34,4 +34,4 @@ .material-theme-darker .mtki { font-style: italic; } .material-theme-darker .mtkb { font-weight: bold; } .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; } -

\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/offline-plugin-app-shell-fallback/index.html b/pr-preview/pr-974/offline-plugin-app-shell-fallback/index.html index ad2f58fc4..a2fdcba5c 100644 --- a/pr-preview/pr-974/offline-plugin-app-shell-fallback/index.html +++ b/pr-preview/pr-974/offline-plugin-app-shell-fallback/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/output-filtering/index.html b/pr-preview/pr-974/output-filtering/index.html index 5f020f1b4..744115ad7 100644 --- a/pr-preview/pr-974/output-filtering/index.html +++ b/pr-preview/pr-974/output-filtering/index.html @@ -1,4 +1,4 @@ -Output filtering | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
Garbage collectionHelm supportKustomize supportOutput filteringRegular ExpressionsExcludingExporting as YAMLInline environmentsServer-Side Apply
References
Frequently asked questionsKnown issues

Output Filtering

When a project becomes bigger over time and includes a lot of Kubernetes +Output filtering | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
Garbage collectionHelm supportKustomize supportOutput filteringRegular ExpressionsExcludingExporting as YAMLInline environmentsServer-Side Apply
References
Frequently asked questionsKnown issues

Output Filtering

When a project becomes bigger over time and includes a lot of Kubernetes objects, it may become required to operate on only a subset of them (e.g. apply only a part of an application).

Tanka helps you with this, by allowing you to limit the used objects on the command line using the --target flag. Say you are deploying an nginx @@ -55,4 +55,4 @@ .material-theme-darker .mtki { font-style: italic; } .material-theme-darker .mtkb { font-weight: bold; } .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; } -

\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/page-data/app-data.json b/pr-preview/pr-974/page-data/app-data.json index 380eb387b..6189847b3 100644 --- a/pr-preview/pr-974/page-data/app-data.json +++ b/pr-preview/pr-974/page-data/app-data.json @@ -1 +1 @@ -{"webpackCompilationHash":"ad006ea505ba3ce4e15f"} +{"webpackCompilationHash":"cecd00f864c9e8dee617"} diff --git a/pr-preview/pr-974/server-side-apply/index.html b/pr-preview/pr-974/server-side-apply/index.html index 3772dc0df..9a7bccb24 100644 --- a/pr-preview/pr-974/server-side-apply/index.html +++ b/pr-preview/pr-974/server-side-apply/index.html @@ -1,4 +1,4 @@ -Server-Side Apply | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
Garbage collectionHelm supportKustomize supportOutput filteringExporting as YAMLInline environmentsServer-Side ApplyField conflicts
References
Frequently asked questionsKnown issues

Server-Side Apply

Tanka supports +Server-Side Apply | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
Garbage collectionHelm supportKustomize supportOutput filteringExporting as YAMLInline environmentsServer-Side ApplyField conflicts
References
Frequently asked questionsKnown issues

Server-Side Apply

Tanka supports server-side apply, which requires at least Kubernetes 1.16+, and was promoted to stable status in 1.22.

To enable server-side diff in tanka, add the following field to spec.json:

{
   "spec": {
@@ -39,4 +39,4 @@
 .material-theme-darker .mtki { font-style: italic; }
 .material-theme-darker .mtkb { font-weight: bold; }
 .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }
-
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/src-components-home-snippet/index.html b/pr-preview/pr-974/src-components-home-snippet/index.html index dd4d42bae..fb3b0682f 100644 --- a/pr-preview/pr-974/src-components-home-snippet/index.html +++ b/pr-preview/pr-974/src-components-home-snippet/index.html @@ -1,4 +1,4 @@ -Snippet | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues
local k = import "k.libsonnet";
+Snippet | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues
local k = import "k.libsonnet";
 
 {
     grafana: k.apps.v1.deployment.new(
@@ -35,4 +35,4 @@
 .material-theme-darker .mtki { font-style: italic; }
 .material-theme-darker .mtkb { font-weight: bold; }
 .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }
-
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/src-components-install-jb-arch/index.html b/pr-preview/pr-974/src-components-install-jb-arch/index.html index 4cf91f08c..621c7db95 100644 --- a/pr-preview/pr-974/src-components-install-jb-arch/index.html +++ b/pr-preview/pr-974/src-components-install-jb-arch/index.html @@ -1,7 +1,7 @@ -Arch | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

On ArchLinux, install using the jsonnet-bundler-bin AUR package:

$ yay jsonnet-bundler-bin
Arch | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

On ArchLinux, install using the jsonnet-bundler-bin AUR package:

$ yay jsonnet-bundler-bin
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/src-components-install-jb-binary/index.html b/pr-preview/pr-974/src-components-install-jb-binary/index.html index 2fb80df15..f878495c4 100644 --- a/pr-preview/pr-974/src-components-install-jb-binary/index.html +++ b/pr-preview/pr-974/src-components-install-jb-binary/index.html @@ -1,4 +1,4 @@ -Binary | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

The jb binary is primarily distributed using GitHub releases.

Linux, macOS

For Linux and macOS, download the binary for your architecture, put it somewhere on your $PATH, and make it an executable:

# Linux amd64:
+Binary | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

The jb binary is primarily distributed using GitHub releases.

Linux, macOS

For Linux and macOS, download the binary for your architecture, put it somewhere on your $PATH, and make it an executable:

# Linux amd64:
 sudo curl -Lo /usr/local/bin/jb https://github.com/jsonnet-bundler/jsonnet-bundler/releases/latest/download/jb-linux-amd64
 sudo chmod a+x /usr/local/bin/jb
 
@@ -35,4 +35,4 @@
 .material-theme-darker .mtki { font-style: italic; }
 .material-theme-darker .mtkb { font-weight: bold; }
 .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }
-
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/src-components-install-jb-go/index.html b/pr-preview/pr-974/src-components-install-jb-go/index.html index ecfdd944c..a64948936 100644 --- a/pr-preview/pr-974/src-components-install-jb-go/index.html +++ b/pr-preview/pr-974/src-components-install-jb-go/index.html @@ -1,4 +1,4 @@ -Go | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

If you happen to have a local Go toolchain available, you can build from source using go install:

$ cd /tmp
+Go | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

If you happen to have a local Go toolchain available, you can build from source using go install:

$ cd /tmp
 $ go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/src-components-install-jb-osx/index.html b/pr-preview/pr-974/src-components-install-jb-osx/index.html index 90f240026..07d639121 100644 --- a/pr-preview/pr-974/src-components-install-jb-osx/index.html +++ b/pr-preview/pr-974/src-components-install-jb-osx/index.html @@ -1,4 +1,4 @@ -Osx | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

On macOS, Jsonnet Bundler is best installed using brew:

$ brew install jsonnet-bundler

This downloads the most recent version of Jsonnet Bundler and installs it.
+Osx | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

On macOS, Jsonnet Bundler is best installed using brew:

$ brew install jsonnet-bundler

This downloads the most recent version of Jsonnet Bundler and installs it.
Also, Jsonnet Bundler is automatically kept up to date as part of brew upgrade.

\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/src-components-install-tk-arch/index.html b/pr-preview/pr-974/src-components-install-tk-arch/index.html index 3935313ef..026d7a889 100644 --- a/pr-preview/pr-974/src-components-install-tk-arch/index.html +++ b/pr-preview/pr-974/src-components-install-tk-arch/index.html @@ -1,4 +1,4 @@ -Arch | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

We maintain two AUR packages, one building from +Arch | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

We maintain two AUR packages, one building from source and another one using a pre-compiled binary.

These can be installed using any AUR helper, e.g. yay:

# from source:
 $ yay tanka
@@ -30,4 +30,4 @@
 .material-theme-darker .mtki { font-style: italic; }
 .material-theme-darker .mtkb { font-weight: bold; }
 .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }
-
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/src-components-install-tk-binary/index.html b/pr-preview/pr-974/src-components-install-tk-binary/index.html index d2ce10549..08b4c4579 100644 --- a/pr-preview/pr-974/src-components-install-tk-binary/index.html +++ b/pr-preview/pr-974/src-components-install-tk-binary/index.html @@ -1,4 +1,4 @@ -Binary | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

For all other operating systems, we provide pre-compiled binaries for Tanka at +Binary | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

For all other operating systems, we provide pre-compiled binaries for Tanka at GitHub Releases.

Just grab the latest version from there, download it and put somewhere in your $PATH (e.g. to /usr/local/bin/tk)

Linux, macOS

For Linux and macOS, download the binary for your architecture, put it somewhere on your $PATH, and make it an executable:

# Linux amd64:
 sudo curl -Lo /usr/local/bin/tk https://github.com/grafana/tanka/releases/latest/download/tk-linux-amd64
@@ -37,4 +37,4 @@
 .material-theme-darker .mtki { font-style: italic; }
 .material-theme-darker .mtkb { font-weight: bold; }
 .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }
-
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/src-components-install-tk-go/index.html b/pr-preview/pr-974/src-components-install-tk-go/index.html index 80de197ce..925d32db3 100644 --- a/pr-preview/pr-974/src-components-install-tk-go/index.html +++ b/pr-preview/pr-974/src-components-install-tk-go/index.html @@ -1,4 +1,4 @@ -Go | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

If you happen to have a local Go toolchain, you can also build Tanka from source using go install:

$ cd /tmp
+Go | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

If you happen to have a local Go toolchain, you can also build Tanka from source using go install:

$ cd /tmp
 $ go install github.com/grafana/tanka/cmd/tk@latest

If that does not work for whatever reason (Go modules, etc), clone and compile manually:

$ git clone https://github.com/grafana/tanka
 $ cd tanka
 $ make install
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/src-components-install-tk-osx/index.html b/pr-preview/pr-974/src-components-install-tk-osx/index.html index 6dedac57b..8ad8cbcc0 100644 --- a/pr-preview/pr-974/src-components-install-tk-osx/index.html +++ b/pr-preview/pr-974/src-components-install-tk-osx/index.html @@ -1,4 +1,4 @@ -Osx | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

On macOS, Tanka is best installed using brew:

$ brew install tanka

This downloads the most recent version of Tanka and installs it.
+Osx | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

On macOS, Tanka is best installed using brew:

$ brew install tanka

This downloads the most recent version of Tanka and installs it.
Also, Tanka is automatically kept up to date as part of brew upgrade.

\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/sw.js b/pr-preview/pr-974/sw.js index 5bcb952c9..bb1c75482 100644 --- a/pr-preview/pr-974/sw.js +++ b/pr-preview/pr-974/sw.js @@ -27,7 +27,7 @@ workbox.core.clientsClaim(); */ self.__precacheManifest = [ { - "url": "webpack-runtime-2951fe80ef92e7082bbe.js" + "url": "webpack-runtime-ac2221ebd859e8b7062b.js" }, { "url": "framework-3d5d6f3c5ba6d5f455c5.js" @@ -46,7 +46,7 @@ self.__precacheManifest = [ }, { "url": "offline-plugin-app-shell-fallback/index.html", - "revision": "ba3918deeaaaa403b760126410401934" + "revision": "bca7b6b2dcc72b88be6d86d47606c9dd" }, { "url": "component---cache-caches-gatsby-plugin-offline-app-shell-js-099d9276a41f4ba01a3c.js" @@ -61,7 +61,7 @@ self.__precacheManifest = [ }, { "url": "page-data/app-data.json", - "revision": "44b591a55f7216d661129b1af78c33d3" + "revision": "c2336ea465c14aaf24e768e0d3d4519c" }, { "url": "polyfill-8d34c62e07e660a83f29.js" diff --git a/pr-preview/pr-974/tutorial/abstraction/index.html b/pr-preview/pr-974/tutorial/abstraction/index.html index 7705ab08f..69f1182b4 100644 --- a/pr-preview/pr-974/tutorial/abstraction/index.html +++ b/pr-preview/pr-974/tutorial/abstraction/index.html @@ -1,4 +1,4 @@ -Abstraction | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
OverviewRefresher on deployingUsing JsonnetParameterizingAbstractionSplitting it upHelper utilitiesKubernetes libraryEnvironments
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Abstraction

While we won't need to touch the resource definitions directly that frequently +Abstraction | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
OverviewRefresher on deployingUsing JsonnetParameterizingAbstractionSplitting it upHelper utilitiesKubernetes libraryEnvironments
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Abstraction

While we won't need to touch the resource definitions directly that frequently anymore now that we have the _config object for our tunables, the main.jsonnet file is still very long and hard to read. Especially because of all the brackets, it's even worse than yaml at the moment.

Splitting it up

Let's start cleaning this up by separating logical pieces into distinct files:

  • main.jsonnet: Still our main file, containing the _config object and importing the other files
  • grafana.jsonnet: Deployment and Service for the Grafana instance
  • prometheus.jsonnet: Deployment and Service for the Prometheus server
/environments/default/grafana.jsonnet
{
@@ -124,4 +124,4 @@
 .material-theme-darker .mtki { font-style: italic; }
 .material-theme-darker .mtkb { font-weight: bold; }
 .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }
-
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/tutorial/environments/index.html b/pr-preview/pr-974/tutorial/environments/index.html index f729574a5..5b35f5c44 100644 --- a/pr-preview/pr-974/tutorial/environments/index.html +++ b/pr-preview/pr-974/tutorial/environments/index.html @@ -1,4 +1,4 @@ -Environments | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
OverviewRefresher on deployingUsing JsonnetParameterizingAbstractionKubernetes libraryEnvironmentsCreating a libraryDev and ProdPatching
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Environments

At this point, our configuration is already flexible and concise, but not +Environments | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
OverviewRefresher on deployingUsing JsonnetParameterizingAbstractionKubernetes libraryEnvironmentsCreating a libraryDev and ProdPatching
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Environments

At this point, our configuration is already flexible and concise, but not really reusable. Let's take a look at Tanka's third buzzword as well: Environments.

These days, the same piece of software is usually deployed many times inside a single organization. This could be dev, testing and prod environments, but also regions (europe, us, asia) or individual customers (foo-corp, @@ -130,4 +130,4 @@ .material-theme-darker .mtki { font-style: italic; } .material-theme-darker .mtkb { font-weight: bold; } .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; } -

\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/tutorial/jsonnet/index.html b/pr-preview/pr-974/tutorial/jsonnet/index.html index 8e9d0434c..33de238f9 100644 --- a/pr-preview/pr-974/tutorial/jsonnet/index.html +++ b/pr-preview/pr-974/tutorial/jsonnet/index.html @@ -1,4 +1,4 @@ -Using Jsonnet | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
OverviewRefresher on deployingUsing JsonnetCreating a new projectEnvironmentsDefining ResourcesTaking a look at the generated resourcesConnecting to the clusterVerifying the changesApplying to the clusterChecking it workedParameterizingAbstractionKubernetes libraryEnvironments
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Using Jsonnet

The most powerful piece of Tanka is the Jsonnet data templating +Using Jsonnet | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
OverviewRefresher on deployingUsing JsonnetCreating a new projectEnvironmentsDefining ResourcesTaking a look at the generated resourcesConnecting to the clusterVerifying the changesApplying to the clusterChecking it workedParameterizingAbstractionKubernetes libraryEnvironments
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Using Jsonnet

The most powerful piece of Tanka is the Jsonnet data templating language. Jsonnet is a superset of JSON, adding variables, functions, patching (deep merging), arithmetic, conditionals and many more to it.

It has a lot in common with more real programming languages such as JavaScript @@ -158,4 +158,4 @@ .material-theme-darker .mtki { font-style: italic; } .material-theme-darker .mtkb { font-weight: bold; } .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; } -

\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/tutorial/k-lib/index.html b/pr-preview/pr-974/tutorial/k-lib/index.html index fcaae26c0..f1e78c161 100644 --- a/pr-preview/pr-974/tutorial/k-lib/index.html +++ b/pr-preview/pr-974/tutorial/k-lib/index.html @@ -1,4 +1,4 @@ -Kubernetes library | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
OverviewRefresher on deployingUsing JsonnetParameterizingAbstractionKubernetes libraryk8s-libsonnetInstallationUsing itFull exampleEnvironments
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Kubernetes library

The last section has shown that using a library for creating Kubernetes objects +Kubernetes library | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
OverviewRefresher on deployingUsing JsonnetParameterizingAbstractionKubernetes libraryk8s-libsonnetInstallationUsing itFull exampleEnvironments
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Kubernetes library

The last section has shown that using a library for creating Kubernetes objects can drastically simplify the code you need to write. However, there is a huge amount of different kinds of objects and the Kubernetes API is evolving (and thus changing) quite rapidly.

Writing and maintaining such a library could be a full-time job on it's own. @@ -117,4 +117,4 @@ .material-theme-darker .mtki { font-style: italic; } .material-theme-darker .mtkb { font-weight: bold; } .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; } -

\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/tutorial/overview/index.html b/pr-preview/pr-974/tutorial/overview/index.html index db1e8803f..c11e06f66 100644 --- a/pr-preview/pr-974/tutorial/overview/index.html +++ b/pr-preview/pr-974/tutorial/overview/index.html @@ -1,5 +1,5 @@ -Overview | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
OverviewLearning how to use TankaResourcesRefresher on deployingUsing JsonnetParameterizingAbstractionKubernetes libraryEnvironments
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Tutorial

Learning how to use Tanka

Welcome to the Tanka tutorial! +Overview | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
OverviewLearning how to use TankaResourcesRefresher on deployingUsing JsonnetParameterizingAbstractionKubernetes libraryEnvironments
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Tutorial

Learning how to use Tanka

Welcome to the Tanka tutorial! The following sections will explain how to deploy an example stack, (Grafana and Prometheus), to Kubernetes. We will also deal with parameters, differences between dev and prod and how to stop worrying and love libraries.

To do so, we have the following steps:

  1. Deploying without Tanka first: Using good old kubectl to understand what Tanka will do for us.
  2. Using Jsonnet: Doing the same thing once again, but this time with Tanka and Jsonnet.
  3. Parameterizing: Using Variables to avoid data duplication.
  4. Abstraction: Splitting components into individual parts.
  5. Environments: Dealing with differences between dev and prod.
  6. k.libsonnet: Avoid having to remember API resources.

Completing this gives a solid knowledge of Tanka's fundamentals. Let's get started!

Resources


NextRefresher on deploying
\ No newline at end of file +https://github.com/grafana/tanka/examples/prom-grafana
NextRefresher on deploying
\ No newline at end of file diff --git a/pr-preview/pr-974/tutorial/parameters/index.html b/pr-preview/pr-974/tutorial/parameters/index.html index 08eaca1f7..bcf7d5e7b 100644 --- a/pr-preview/pr-974/tutorial/parameters/index.html +++ b/pr-preview/pr-974/tutorial/parameters/index.html @@ -1,4 +1,4 @@ -Parameterizing | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
OverviewRefresher on deployingUsing JsonnetParameterizingConfig objectAbstractionKubernetes libraryEnvironments
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Parameterizing

Deploying using Tanka worked well, but it did not really improve the situation +Parameterizing | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
OverviewRefresher on deployingUsing JsonnetParameterizingConfig objectAbstractionKubernetes libraryEnvironments
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Parameterizing

Deploying using Tanka worked well, but it did not really improve the situation in terms of maintainability and readability.

To do so, the following sections will explore some ways Jsonnet provides us with.

Config object

The most straightforward thing to do is creating a hidden object that holds all actual values in a single place to be consumed by the actual resources.

Luckily, Jsonnet has the key:: "value" stanza for private fields. Such are only available during compiling and will be removed from the actual output.

Such an object could look like this:

{
@@ -63,4 +63,4 @@
 .material-theme-darker .mtki { font-style: italic; }
 .material-theme-darker .mtkb { font-weight: bold; }
 .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; }
-
\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/tutorial/refresher/index.html b/pr-preview/pr-974/tutorial/refresher/index.html index a624d3f85..181834646 100644 --- a/pr-preview/pr-974/tutorial/refresher/index.html +++ b/pr-preview/pr-974/tutorial/refresher/index.html @@ -1,4 +1,4 @@ -Refresher on deploying | Tanka
That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
OverviewRefresher on deployingDeploying to Kubernetes using kubectlWriting the yamlDeploying to the clusterChecking it workedCleaning upUsing JsonnetParameterizingAbstractionKubernetes libraryEnvironments
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Refresher on deploying

Deploying to Kubernetes using kubectl

To understand how Tanka works, it is important to know what steps are required +Refresher on deploying | Tanka

That's my logoGrafana TankaFlexible, reusable and concise configuration for Kubernetes
Edit page
IntroductionInstallation
Tutorial
OverviewRefresher on deployingDeploying to Kubernetes using kubectlWriting the yamlDeploying to the clusterChecking it workedCleaning upUsing JsonnetParameterizingAbstractionKubernetes libraryEnvironments
Writing Jsonnet
Libraries
Advanced features
References
Frequently asked questionsKnown issues

Refresher on deploying

Deploying to Kubernetes using kubectl

To understand how Tanka works, it is important to know what steps are required for the task of deploying Grafana and Prometheus to Kubernetes:

  1. Prometheus
    • A Deployment must be created, to run the prom/prometheus image
    • Also a Service is needed for Grafana to be able to connect port 9090 of Prometheus.
  2. Grafana
    • Another Deployment is required for the Grafana server.
    • To connect to the web interface, we will be using a Service of type NodePort.

Before taking a look how Tanka can help doing so, let's recall how to do it with @@ -52,7 +52,7 @@ service/prometheus created

Checking it worked

So far so good, but can we tell it actually did what we wanted? Let's test that Grafana can connect to Prometheus!

# Temporarily forward Grafana to localhost
 kubectl port-forward deployments/grafana 8080:3000

Now go to http://localhost:8080 in your browser and login using admin:admin. -Then navigate to Connections > Data Sources > Add data source, choose +Then navigate to Connections > Data sources > Add new data source, choose Prometheus as type and enter http://prometheus:9090 as URL. Hit Save & Test which should yield a big green bar telling you everything is good.

Cool! This worked out well for this small example, but the .yaml files are hard to read and maintain. Especially when you need to deploy this exact same @@ -82,4 +82,4 @@ .material-theme-darker .mtki { font-style: italic; } .material-theme-darker .mtkb { font-weight: bold; } .material-theme-darker .mtku { text-decoration: underline; text-underline-position: under; } -

\ No newline at end of file +
\ No newline at end of file diff --git a/pr-preview/pr-974/webpack-runtime-2951fe80ef92e7082bbe.js b/pr-preview/pr-974/webpack-runtime-ac2221ebd859e8b7062b.js similarity index 97% rename from pr-preview/pr-974/webpack-runtime-2951fe80ef92e7082bbe.js rename to pr-preview/pr-974/webpack-runtime-ac2221ebd859e8b7062b.js index 887acc0a6..6b666519a 100644 --- a/pr-preview/pr-974/webpack-runtime-2951fe80ef92e7082bbe.js +++ b/pr-preview/pr-974/webpack-runtime-ac2221ebd859e8b7062b.js @@ -1,2 +1,2 @@ -!function(e){function o(o){for(var t,d,a=o[0],i=o[1],s=o[2],m=0,p=[];m