Skip to content

Commit 8e2fe6f

Browse files
committed
remove bitnami example
1 parent c8d6573 commit 8e2fe6f

File tree

2 files changed

+13
-52
lines changed

2 files changed

+13
-52
lines changed

docs/partials/application-links/_nginx-service.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
labels:
77
app: nginx
88
annotations:
9-
kots.io/when: '{{repl not IsKurl }}'
9+
kots.io/when: repl{{ or (eq Distribution "embedded-cluster") (eq Distribution "kurl")}}
1010
spec:
1111
type: ClusterIP
1212
ports:
@@ -21,7 +21,7 @@ metadata:
2121
labels:
2222
app: nginx
2323
annotations:
24-
kots.io/when: '{{repl IsKurl }}'
24+
kots.io/when: repl{{ or (eq Distribution "embedded-cluster") (eq Distribution "kurl")}}
2525
spec:
2626
type: NodePort
2727
ports:

docs/vendor/admin-console-port-forward.mdx

Lines changed: 11 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import Tabs from '@theme/Tabs';
22
import TabItem from '@theme/TabItem';
33
import ServicePortNote from "../partials/custom-resource-application/_servicePort-note.mdx"
4-
import GiteaKotsApp from "../partials/getting-started/_gitea-kots-app-cr.mdx"
5-
import GiteaHelmChart from "../partials/getting-started/_gitea-helmchart-cr.mdx"
6-
import GiteaK8sApp from "../partials/getting-started/_gitea-k8s-app-cr.mdx"
74
import PortsApplicationURL from "../partials/custom-resource-application/_ports-applicationURL.mdx"
85
import NginxKotsApp from "../partials/application-links/_nginx-kots-app.mdx"
96
import NginxK8sApp from "../partials/application-links/_nginx-k8s-app.mdx"
107
import NginxService from "../partials/application-links/_nginx-service.mdx"
118
import NginxDeployment from "../partials/application-links/_nginx-deployment.mdx"
9+
import EcCr from "../partials/getting-started/_slackernews-embedded-cluster.mdx"
1210

1311
# Port Forward Services with KOTS
1412

@@ -162,61 +160,20 @@ The following example shows an **Open App** link on the dashboard of the Admin C
162160

163161
[View a larger version of this image](/images/gitea-open-app.png)
164162

165-
## Examples
166-
167-
This section provides examples of how to configure the `ports` key to port-forward a service in existing cluster installations and add links to services on the Admin Console dashboard.
168-
169-
### Example: Bitnami Gitea Helm Chart with LoadBalancer Service
170-
171-
This example uses a KOTS Application custom resource and a Kubernetes SIG Application custom resource to configure port forwarding for the Bitnami Gitea Helm chart in existing cluster installations, and add a link to the port-forwarded service on the Admin Console dashboard. To view the Gitea Helm chart source, see [bitnami/gitea](https://github.com/bitnami/charts/blob/main/bitnami/gitea) in GitHub.
172-
173-
To test this example:
174-
175-
1. Pull version 1.0.6 of the Gitea Helm chart from Bitnami:
176-
177-
```
178-
helm pull oci://registry-1.docker.io/bitnamicharts/gitea --version 1.0.6
179-
```
180-
181-
1. Add the `gitea-1.0.6.tgz` chart archive to a new, empty release in the Vendor Portal along with the `kots-app.yaml`, `k8s-app.yaml`, and `gitea.yaml` files provided below. Promote to the channel that you use for internal testing. For more information, see [Manage Releases with the Vendor Portal](releases-creating-releases).
182-
183-
<Tabs>
184-
<TabItem value="kots-app" label="kots-app.yaml" default>
185-
<h5>Description</h5>
186-
<p>Based on the <a href="https://github.com/bitnami/charts/blob/main/bitnami/gitea/templates/svc.yaml">templates/svc.yaml</a> and <a href="https://github.com/bitnami/charts/blob/main/bitnami/gitea/values.yaml">values.yaml</a> files in the Gitea Helm chart, the following KOTS Application custom resource adds port 3000 to the port forward tunnel and maps local port 8888. Port 3000 is the container port of the Pod where the <code>gitea</code> service runs.</p>
187-
<h5>YAML</h5>
188-
<GiteaKotsApp/>
189-
</TabItem>
190-
<TabItem value="k8s-app" label="k8s-app.yaml" default>
191-
<h5>Description</h5>
192-
<p>The Kubernetes Application custom resource lists the same URL as the `ports.applicationUrl` field in the KOTS Application custom resource (`"http://nginx"`). This adds a link to the port-forwarded service from the Admin Console dashboard. It also triggers KOTS to rewrite the URL to use the hostname in the browser and append the specified `localPort`. The label to be used for the link in the Admin Console is "Open App".</p>
193-
<h5>YAML</h5>
194-
<GiteaK8sApp/>
195-
</TabItem>
196-
<TabItem value="helmchart" label="gitea.yaml" default>
197-
<h5>Description</h5>
198-
<p>The KOTS HelmChart custom resource provides instructions to KOTS about how to deploy the Helm chart. The <code>name</code> and <code>chartVersion</code> listed in the HelmChart custom resource must match the name and version of a Helm chart archive in the release. Each Helm chart archive in a release requires a unique HelmChart custom resource.</p>
199-
<h5>YAML</h5>
200-
<GiteaHelmChart/>
201-
</TabItem>
202-
</Tabs>
203-
204-
1. Install the release to confirm that the service was port-forwarded successfully. To test the port forward, click **Open App** on the Admin Console dashboard after the application reaches a Ready state. For more information, see [Online Installation in Existing Clusters with KOTS](/enterprise/installing-existing-cluster).
205-
206-
### Example: NGINX Application with ClusterIP and NodePort Services
163+
## Example: NGINX Application with ClusterIP and NodePort Services
207164

208165
The following example demonstrates how to link to a port-forwarded ClusterIP service for existing cluster installations.
209166

210167
It also shows how to use the `ports` key to add a link to a NodePort service for kURL installations. Although the primary purpose of the `ports` key is to port forward services for existing cluster installations, it is also possible to use the `ports` key so that links to NodePort services for Embedded Cluster or kURL installations use the hostname in the browser. For information about exposing NodePort services for Embedded Cluster or kURL installations, see [Exposing Services Using NodePorts](kurl-nodeport-services).
211168

212169
To test this example:
213170

214-
1. Add the `example-service.yaml`, `example-deployment.yaml`, `kots-app.yaml`, and `k8s-app.yaml` files provided below to a new, empty release in the Vendor Portal. Promote to the channel that you use for internal testing. For more information, see [Manage Releases with the Vendor Portal](releases-creating-releases).
171+
1. Add the `example-service.yaml`, `example-deployment.yaml`, `kots-app.yaml`, `k8s-app.yaml`, and `embedded-cluster.yaml` files provided below to a new, empty release in the Vendor Portal. Promote to the channel that you use for internal testing. For more information, see [Manage Releases with the Vendor Portal](releases-creating-releases).
215172

216173
<Tabs>
217174
<TabItem value="service" label="example-service.yaml" default>
218175
<h5>Description</h5>
219-
<p>The YAML below contains ClusterIP and NodePort specifications for a service named <code>nginx</code>. Each specification uses the <code>kots.io/when</code> annotation with the Replicated IsKurl template function to conditionally include the service based on the installation type (existing cluster or kURL cluster). For more information, see <a href="/vendor/packaging-include-resources">Conditionally Including or Excluding Resources</a> and <a href="/reference/template-functions-static-context#iskurl">IsKurl</a>.</p>
176+
<p>The YAML below contains ClusterIP and NodePort specifications for a service named <code>nginx</code>. Each specification uses the <code>kots.io/when</code> annotation with the Replicated <a href="/reference/template-functions-static-context#distribution">Distribution</a> template function to conditionally include the service based on the installation type (existing cluster or Embedded Cluster/kURL cluster). For more information, see <a href="/vendor/packaging-include-resources">Conditionally Including or Excluding Resources</a>.</p>
220177
<p>As shown below, both the ClusterIP and NodePort <code>nginx</code> services are exposed on port 80.</p>
221178
<h5>YAML</h5>
222179
<NginxService/>
@@ -239,13 +196,17 @@ To test this example:
239196
<h5>YAML</h5>
240197
<NginxK8sApp/>
241198
</TabItem>
199+
<TabItem value="embedded" label="embedded-cluster.yaml" default>
200+
<h5>Description</h5>
201+
<p>To install your application with Embedded Cluster, an Embedded Cluster Config must be present in the release. At minimum, the Embedded Cluster Config sets the version of Embedded Cluster that will be installed. You can also define several characteristics about the cluster.</p>
202+
<h5>YAML</h5>
203+
<EcCr/>
204+
</TabItem>
242205
</Tabs>
243206

244207
1. Install the release into an existing cluster and confirm that the service was port-forwarded successfully by clicking **Open App** on the Admin Console dashboard. For more information, see [Online Installation in Existing Clusters with KOTS](/enterprise/installing-existing-cluster).
245208

246-
1. If there is not already a kURL installer promoted to the channel, add a kURL installer to the release to support kURL installs. For more information, see [Create a kURL Installer](/vendor/packaging-embedded-kubernetes).
247-
248-
1. Install the release on a VM and confirm that the service was exposed successfully. To test the port forward, click **Open App** on the Admin Console dashboard after the application reaches a Ready state. For more information, see [Online Installation with kURL](/enterprise/installing-kurl).
209+
1. Install the release on a VM and confirm that the service was exposed successfully. To test the port forward, click **Open App** on the Admin Console dashboard after the application reaches a Ready state. For more information, see [Online Installation with Embedded Cluster](/enterprise/installing-embedded) or [Online Installation with kURL](/enterprise/installing-kurl).
249210

250211
:::note
251212
Ensure that the VM where you install allows HTTP traffic.

0 commit comments

Comments
 (0)