mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-25 04:28:15 +00:00
Include documentation on how to make UI extensions work in airgap mode in the official Rancher Docs
This commit is contained in:
@@ -53,9 +53,76 @@ In v2.7.0, the built-in extensions aren't displayed under the **Available** tab.
|
||||
|
||||

|
||||
|
||||
### Importing and Installing Extensions in an Air-Gapped Environment
|
||||
### Accessing Rancher UI Extensions in Air-Gapped Environments
|
||||
|
||||
1. Find the address of the container image repository that you want to import as an extension. Rancher provides some extensions, such as Kubewarden and Elemental, through the `ui-plugin-catalog` container image at https://hub.docker.com/r/rancher/ui-plugin-catalog/tags. You should import and use the latest tagged version of the image to ensure you receive the latest features and security updates.
|
||||
Rancher provides some extensions, such as Kubewarden and Elemental, through the `ui-plugin-catalog` container image at https://hub.docker.com/r/rancher/ui-plugin-catalog/tags. If you're trying to install these extensions in an air-gapped environment, you must make the `ui-plugin-catalog` accessible.
|
||||
|
||||
1. Mirror the `ui-plugin-catalog` image to a private registry:
|
||||
```bash
|
||||
export REGISTRY_ENDPOINT="my-private-registry.com"
|
||||
docker pull rancher/ui-plugin-catalog:1.0.0
|
||||
docker tag rancher/ui-plugin-catalog:1.0.0 $REGISTRY_ENDPOINT/rancher/ui-plugin-catalog:1.0.0
|
||||
docker push $REGISTRY_ENDPOINT/rancher/ui-plugin-catalog:1.0.0
|
||||
```
|
||||
1. Use the mirrored image to create a Kubernetes [deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/):
|
||||
```yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ui-plugin-catalog
|
||||
namespace: cattle-ui-plugin-system
|
||||
labels:
|
||||
catalog.cattle.io/ui-extensions-catalog-image: ui-plugin-catalog
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
catalog.cattle.io/ui-extensions-catalog-image: ui-plugin-catalog
|
||||
template:
|
||||
metadata:
|
||||
namespace: cattle-ui-plugin-system
|
||||
labels:
|
||||
catalog.cattle.io/ui-extensions-catalog-image: ui-plugin-catalog
|
||||
spec:
|
||||
containers:
|
||||
- name: server
|
||||
image: my-private-registry.com/rancher/ui-plugin-catalog:1.0.0
|
||||
imagePullPolicy: Always
|
||||
imagePullSecrets:
|
||||
- name: my-registry-credentials
|
||||
```
|
||||
1. Expose the deployment by creating a [ClusterIP service](https://kubernetes.io/docs/concepts/services-networking/service/#type-clusterip):
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ui-plugin-catalog-svc
|
||||
namespace: cattle-ui-plugin-system
|
||||
spec:
|
||||
ports:
|
||||
- name: catalog-svc-port
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
selector:
|
||||
catalog.cattle.io/ui-extensions-catalog-image: ui-plugin-catalog
|
||||
type: ClusterIP
|
||||
```
|
||||
1. Create a [ClusterRepo](../how-to-guides/new-user-guides/helm-charts-in-rancher/helm-charts-in-rancher.md) that targets the ClusterIP service:
|
||||
```yaml
|
||||
apiVersion: catalog.cattle.io/v1
|
||||
kind: ClusterRepo
|
||||
metadata:
|
||||
name: ui-plugin-catalog-repo
|
||||
spec:
|
||||
url: http://ui-plugin-catalog-svc.cattle-ui-plugin-system:8080
|
||||
```
|
||||
|
||||
After you successfully set up these resources, you can install the extensions from the `ui-plugin-charts` manifest into your air-gapped environment.
|
||||
|
||||
### Importing and Installing Extensions in an Air-gapped Environment
|
||||
|
||||
1. Find the address of the container image repository that you want to import as an extension. You should import and use the latest tagged version of the image to ensure you receive the latest features and security updates.
|
||||
|
||||
* **(Optional)** If the container image is private: [Create](../how-to-guides/new-user-guides/kubernetes-resources-setup/secrets.md) a registry secret within the `cattle-ui-plugin-system` namespace. Enter the domain of the image address in the **Registry Domain Name** field.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user