Skip to content

Commit 68c10f7

Browse files
authored
feat(docs): add examples documentation for scaffolds (#451)
* `feat(docs): Add Helm deployment examples with inline and external values files for continuous deployment` * `docs: add prerequisites for cert-manager, ingress, and externaldns in Helm deployment examples` * `feat: add new examples for deploying WordPress with Kustomize, Helm, and Liquid templates` * fix(docs): update wording for service deployment status in kustomize-with-helm guide for clarity * fix(docs): refine helm deployment titles for improved clarity and consistency in documentation * fix(docs): refine helm deployment titles for improved clarity and consistency in documentation * docs: clarify unpacking requirements for helm charts in kustomization examples * feat: switch to liquid templating for helm values file and add configurable host in deployment * fix(docs): update placeholder links with actual GitHub URLs for Helm example files * docs: remove redundant kustomize-with-helm example and update references in related documentation files * chore: regenerate routes * `refactor(docs): update image references and add new console access steps in deployment examples` * docs: update heading levels in continuous deployment example for improved structure * fix(docs): update timestamps and correct title capitalization for Helm chart deployment examples
1 parent 337a69b commit 68c10f7

13 files changed

Lines changed: 748 additions & 0 deletions

generated/routes.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,30 @@
275275
"relPath": "/plural-features/notifications/index.md",
276276
"lastmod": "2025-03-12T14:59:41.000Z"
277277
},
278+
"/examples": {
279+
"relPath": null,
280+
"lastmod": null
281+
},
282+
"/examples/continuous-deployment": {
283+
"relPath": "/examples/continuous-deployment/index.md",
284+
"lastmod": "2025-05-07T11:15:56.000Z"
285+
},
286+
"/examples/continuous-deployment/helm-basic-with-inline-values": {
287+
"relPath": "/examples/continuous-deployment/helm-basic-with-inline-values.md",
288+
"lastmod": "2025-05-07T11:12:43.000Z"
289+
},
290+
"/examples/continuous-deployment/helm-basic-with-values-file": {
291+
"relPath": "/examples/continuous-deployment/helm-basic-with-values-file.md",
292+
"lastmod": "2025-05-07T11:12:43.000Z"
293+
},
294+
"/examples/continuous-deployment/kustomize-inflate-helm": {
295+
"relPath": "/examples/continuous-deployment/kustomize-inflate-helm.md",
296+
"lastmod": "2025-05-07T11:12:43.000Z"
297+
},
298+
"/examples/continuous-deployment/kustomize-stack-with-liquid": {
299+
"relPath": "/examples/continuous-deployment/kustomize-stack-with-liquid.md",
300+
"lastmod": "2025-05-07T11:12:43.000Z"
301+
},
278302
"/faq": {
279303
"relPath": "/faq/index.md",
280304
"lastmod": "2025-03-12T14:59:41.000Z"
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: Deploy a Helm chart with inline values
3+
description: 'Learn how to deploy a Grafana instance using Helm chart with inline configuration values, including ingress setup and TLS configuration'
4+
---
5+
6+
## Overview
7+
8+
In this guide, you'll learn how to deploy Grafana (a popular monitoring tool) on your Kubernetes cluster using Plural.
9+
We'll show you how to use Helm charts - think of them as pre-packaged applications - with inline configuration values,
10+
which means we'll define all our settings directly in the deployment file. This approach makes it easy to manage and
11+
update your applications.
12+
13+
## Prerequisites
14+
15+
Before you begin, make sure to cover [prerequisites and setup](../#prerequisites), and that you have:
16+
- `cert-manager`, ingress controller and `externaldns` installed in the target cluster.
17+
18+
{% callout severity="info" %}
19+
When using `plural up` and the `mgmt` as the target cluster `cert-manager`, `nginx-ingress` and `externaldns` will already be installed.
20+
{% /callout %}
21+
22+
## Step-by-Step Guide: Deploying Grafana with Inline Helm Values
23+
Let's walk through deploying Grafana using a Helm chart with inline configuration values. Feel free to adjust provided file
24+
examples according to your needs and commit them to your configured Git repository under the `apps` directory. There is a
25+
default `apps` service that deploys all resources from that directory.
26+
27+
### Step 1: Create a ServiceDeployment resource
28+
Create our service deployment that uses a remote helm chart and inline values to deploy a fully
29+
functional Grafana instance.
30+
31+
##### [apps/examples/helm-basic-with-inline-values/servicedeployment.yaml](https://github.com/pluralsh/scaffolds/blob/main/examples/helm-basic-with-inline-values/servicedeployment.yaml)
32+
```yaml
33+
apiVersion: deployments.plural.sh/v1alpha1
34+
kind: ServiceDeployment
35+
metadata:
36+
name: plrl-01-grafana
37+
namespace: examples
38+
spec:
39+
helm:
40+
# Remote helm repository
41+
url: https://grafana.github.io/helm-charts
42+
# Chart within that repository that should be deployed
43+
chart: grafana
44+
# Version can use an exact version or 'x' to allow patch/minor/major version bumps without user interaction
45+
version: x.x.x # Replace with your desired version or leave as is to always use the latest version
46+
values:
47+
# Our custom inline values
48+
ingress:
49+
enabled: true
50+
annotations:
51+
cert-manager.io/cluster-issuer: plural
52+
ingressClassName: nginx
53+
hosts:
54+
- grafana-test.your-domain.com
55+
tls:
56+
- hosts:
57+
- grafana-test.your-domain.com
58+
secretName: grafana-tls
59+
# A reference to the cluster resource instance we've created in the previous step
60+
clusterRef:
61+
kind: Cluster
62+
name: mgmt
63+
namespace: examples
64+
```
65+
66+
### Step 2: Check Plural Console and access Grafana
67+
After a couple of minutes, service should be deployed and running.
68+
![](/assets/examples/plrl-01-console.png 'CD tab -> mgmt cluster -> plrl-01-grafana service')
69+
70+
Grafana should now be accessible at the configured address.
71+
![](/assets/examples/plrl-grafana.png 'https://grafana-test.your-domain.com')
72+
73+
## Key Takeaways
74+
75+
Congratulations! You've just learned how to:
76+
77+
- Deploy an application (Grafana) using Helm charts in Plural
78+
- Connect your deployment to a specific cluster
79+
- Configure your application using inline values (settings written directly in the file)
80+
- Set up secure access to your application with TLS (https)
81+
- Monitor your deployment using Plural Console
82+
83+
This example shows you the basics of deploying applications on Plural. You can use this same approach to deploy other
84+
applications - just change the Helm chart and adjust the configuration values to match your needs. Remember, the Plural
85+
Console is always there to help you monitor and manage your deployments.
86+
87+
Need help? Join our community [Discord server](https://discord.com/invite/bEBAMXV64s) or check out more examples in our documentation.
88+
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
title: Deploy a helm chart with git-sourced values file
3+
description: 'Learn how to deploy a Grafana instance using Helm chart with configuration values stored in a separate values file, including ingress setup and TLS configuration'
4+
---
5+
6+
## Overview
7+
8+
In this guide, you'll learn how to deploy Grafana (a popular monitoring tool) on your Kubernetes cluster using Plural.
9+
We'll show you how to use Helm charts - think of them as pre-packaged applications - with configuration values stored in a separate values file.
10+
This approach helps separate configuration from deployment logic, making it easier to manage complex deployments and track
11+
configuration changes over time.
12+
13+
## Prerequisites
14+
15+
Before you begin, make sure to cover [prerequisites and setup](../#prerequisites), and that you have:
16+
- `cert-manager`, ingress controller and `externaldns` installed in the target cluster.
17+
18+
{% callout severity="info" %}
19+
When using `plural up` and the `mgmt` as the target cluster `cert-manager`, `nginx-ingress` and `externaldns` will already be installed.
20+
{% /callout %}
21+
22+
## Step-by-Step Guide: Deploying Grafana with External Values File
23+
Let's walk through deploying Grafana using a Helm chart with an external values file. Feel free to adjust provided file
24+
examples according to your needs and commit them to your configured Git repository under the `apps` directory. There is a
25+
default `apps` service that deploys all resources from that directory.
26+
27+
### Step 1: Create values file for your Grafana configuration
28+
Create a separate values file to store your Grafana configuration. This approach keeps your configuration neatly separated from the deployment definition.
29+
30+
##### [helm-values/plrl-02-grafana.yaml.liquid](https://github.com/pluralsh/scaffolds/blob/main/examples/helm-basic-with-values-file/helm-values/plrl-02-grafana.yaml.liquid)
31+
```yaml
32+
# Custom values for Grafana
33+
ingress:
34+
enabled: true
35+
annotations:
36+
cert-manager.io/cluster-issuer: plural
37+
ingressClassName: nginx
38+
39+
hosts:
40+
- {{ configuration.host }}
41+
42+
tls:
43+
- hosts:
44+
- {{ configuration.host }}
45+
secretName: grafana-tls
46+
```
47+
### Step 2: Create a ServiceDeployment resource
48+
Next, create your service deployment that references the external values file you just created.
49+
50+
##### [apps/examples/helm-basic-with-values-file/servicedeployment.yaml](https://github.com/pluralsh/scaffolds/blob/main/examples/helm-basic-with-values-file/servicedeployment.yaml)
51+
```yaml
52+
apiVersion: deployments.plural.sh/v1alpha1
53+
kind: ServiceDeployment
54+
metadata:
55+
name: plrl-02-grafana
56+
namespace: examples
57+
spec:
58+
# GitRepository reference that points to a git repo where values file is stored
59+
repositoryRef:
60+
kind: GitRepository
61+
name: example
62+
namespace: examples
63+
git:
64+
# A directory in the git repository with the values file
65+
folder: helm-values
66+
ref: main
67+
helm:
68+
# Remote helm repository
69+
url: https://grafana.github.io/helm-charts
70+
# Chart within that repository that should be deployed
71+
chart: grafana
72+
# Version can use an exact version or 'x' to allow patch/minor/major version bumps without user interaction
73+
version: x.x.x # Replace with your desired version or leave as is to always use the latest version
74+
# Reference to our external values file
75+
valuesFiles:
76+
# a relative path to the values file based on the configured git folder
77+
- plrl-02-grafana.yaml.liquid
78+
# inline configuration that will be passed as a context to the liquid helm values file
79+
configuration:
80+
host: 'grafana-test.your-domain.com'
81+
# A reference to the cluster resource instance we've created in the previous step
82+
clusterRef:
83+
kind: Cluster
84+
name: mgmt
85+
namespace: examples
86+
```
87+
88+
### Step 3: Check Plural Console and access Grafana
89+
After a couple of minutes, service should be deployed and running.
90+
![](/assets/examples/plrl-02-console.png 'CD tab -> mgmt cluster -> plrl-02-grafana service')
91+
92+
Grafana should now be accessible at the configured address.
93+
![](/assets/examples/plrl-grafana.png 'https://grafana-test.your-domain.com')
94+
95+
## Advantages of External Values Files
96+
Using external values files offers several benefits:
97+
1. **Separation of concerns** - Keep deployment logic separate from configuration
98+
3. **Reusability** - Reuse the same values file for multiple deployments
99+
4. **Security** - Store sensitive configuration in separate, properly secured files
100+
5. **Readability** - Maintain cleaner, more organized deployment files
101+
102+
## Key Takeaways
103+
Congratulations! You've just learned how to:
104+
- Deploy an application (Grafana) using Helm charts in Plural
105+
- Store and manage configuration in an external values file
106+
- Connect your deployment to a specific cluster
107+
- Set up secure access to your application with TLS (https)
108+
- Monitor your deployment using Plural Console
109+
110+
This approach scales well for managing complex applications or multiple deployments. As your configuration grows, you can further organize your values files by splitting them into environment-specific versions or by application component.
111+
112+
Need help? Join our community [Discord server](https://discord.com/invite/bEBAMXV64s) or check out more examples in our documentation.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: Continuous deployment
3+
description: 'Learn how to deploy applications using Helm charts, Kustomize, and Git-based Kubernetes resources with advanced orchestration capabilities'
4+
---
5+
6+
## Overview
7+
8+
This section provides practical examples of using Plural's Continuous Deployment feature to easily install and manage
9+
applications in your Kubernetes clusters. Plural is a comprehensive platform that simplifies infrastructure management for
10+
DevOps teams and developers.
11+
12+
These examples demonstrate how Plural can help you:
13+
14+
- **Deploy Applications Flexibly**: Use Helm charts with either inline values for simplicity or external values files for better organization of complex configurations
15+
- **Provision Infrastructure**: Create and manage your entire infrastructure stack including Kubernetes clusters, databases, and cloud resources using Infrastructure Stacks powered by Terraform and Ansible
16+
- **Enhance Kubernetes Deployments**: Apply Liquid templating to customize Helm values and raw Kubernetes manifests
17+
- **Build Connected Services**: Create services with proper dependencies and orchestration between components
18+
- **Implement GitOps Workflows**: Manage multi-environment deployments (like dev → staging → production) with clear separation and controlled promotion between environments
19+
- **Automate Updates**: Leverage pipeline observers to automatically generate pull requests when new versions of your applications are available
20+
21+
Plural brings these capabilities together in a unified platform that combines the best practices of GitOps with powerful deployment tools that work across any infrastructure. The examples in this section will guide you through practical implementations that you can adapt to your own projects.
22+
23+
All files used in the provided examples can be found in our
24+
[scaffolds](https://github.com/pluralsh/scaffolds/tree/main/examples) repository.
25+
26+
## Prerequisites
27+
Before you begin, make sure you have:
28+
- A Plural cluster set up with continuous deployment (CD) enabled
29+
- A Git repository connected to your Plural setup (this is where we'll store our configuration files)
30+
- Plural Console running on your cluster (this is the web interface we'll use to monitor our deployment)
31+
32+
If you're missing any of these, please refer to the [First Steps guide](../../getting-started/first-steps) to set up your environment.
33+
34+
## Setup
35+
For simplicity, all examples in this guide use the `mgmt` cluster as the deployment target and a main infrastructure repository (initially created during Plural bootstrapping with `plural up`) to store the configuration. Before proceeding, create the required `Cluster` and `GitRepository` resources that will be shared across all examples.
36+
37+
### Create a read-only cluster resource
38+
First, we'll create and adopt a cluster that will serve as the target for our examples. While the `mgmt` cluster typically exists in the `infra` namespace, we can adopt additional read-only clusters through our custom resources as needed
39+
40+
##### [apps/examples/cluster.yaml](#TODO)
41+
```yaml
42+
apiVersion: deployments.plural.sh/v1alpha1
43+
kind: Cluster
44+
metadata:
45+
name: mgmt
46+
namespace: examples
47+
spec:
48+
# providing only a handle allows us to adopt the existing cluster
49+
handle: mgmt
50+
```
51+
52+
### Create a GitRepository resource
53+
Next, create a GitRepository resource to access files you'll commit while working through these examples.
54+
55+
##### [apps/examples/gitrepository.yaml](#TODO)
56+
```yaml
57+
apiVersion: deployments.plural.sh/v1alpha1
58+
kind: GitRepository
59+
metadata:
60+
name: example
61+
namespace: examples
62+
spec:
63+
# This can point to your main infra repository used by the Plural CD engine
64+
# or to a different one. It will be used to store helm values file for our service.
65+
url: git@github.com:<your_example_repository>.git
66+
```

0 commit comments

Comments
 (0)