mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-20 21:14:25 +02:00
penShift Support
1 parent
3219c5dfc1
commit
7d3b555c2b
1 file changed
+26
-28
@@ -1,6 +1,29 @@
|
||||
This page explains how to repackage the application in order to be deployed onto minikube (development scale Kubernetes with a single node).
|
||||
This page explains how to deploy SeaweedFS to Kubernetes. While the [Introduction](#intro) and [Yaml Files](#yaml-files) sections describe manual deployment with static YAMLs (useful for learning), the recommended approach for production is using the **Helm Chart**.
|
||||
|
||||
# Intro
|
||||
# Recommended: Helm Deployment
|
||||
|
||||
The SeaweedFS Helm chart is the most flexible and maintained way to deploy SeaweedFS on Kubernetes.
|
||||
|
||||
```bash
|
||||
helm repo add seaweedfs https://seaweedfs.github.io/seaweedfs/helm
|
||||
helm install seaweedfs seaweedfs/seaweedfs
|
||||
```
|
||||
|
||||
For detailed configuration options, see the [Helm Chart README](https://github.com/seaweedfs/seaweedfs/tree/master/k8s/charts/seaweedfs).
|
||||
|
||||
# OpenShift Support
|
||||
|
||||
If you are deploying on **OpenShift** or any cluster with "restricted" Pod Security Standards, you must use the platform-specific overrides:
|
||||
|
||||
```bash
|
||||
helm install seaweedfs seaweedfs/seaweedfs \
|
||||
-n seaweedfs --create-namespace \
|
||||
-f https://raw.githubusercontent.com/seaweedfs/seaweedfs/master/k8s/charts/seaweedfs/openshift-values.yaml
|
||||
```
|
||||
|
||||
This configuration avoids `hostPath` volumes and root-owned processes, which are typically restricted on OpenShift.
|
||||
|
||||
# Manual Deployment (Educational)
|
||||
|
||||
`Kubernetes` is an open-source system for automating deployment, scaling, and management of containerized applications.
|
||||
|
||||
@@ -183,29 +206,4 @@ http://minikubecluster:30070/ui/index.html
|
||||
```
|
||||
|
||||
`minikubecluster` in my environment resolves to the IP address of the minikube's VM which you can get using `minikube ip` command.
|
||||
|
||||
# OpenShift Deployment
|
||||
|
||||
OpenShift (and other clusters enforcing the `restricted` Pod Security Standard) has stricter security requirements than default Kubernetes. Specifically, it blocks containers that attempt to run as root or use `hostPath` volumes.
|
||||
|
||||
SeaweedFS can be deployed on OpenShift by using a specialized Helm values file that overrides the defaults to comply with the `restricted` Security Context Constraints (SCC).
|
||||
|
||||
## Steps
|
||||
|
||||
1. Use the generic SeaweedFS Helm chart but provide the `openshift-values.yaml` overrides file. This file (located in the chart directory) configures the pods to:
|
||||
- Use `PersistentVolumeClaims` instead of `hostPath`.
|
||||
- Set `runAsNonRoot: true` and omit specific UIDs (allowing OpenShift to automatically assign a valid UID from the namespace's allocated range).
|
||||
- Drop all Linux capabilities and disable privilege escalation.
|
||||
- Use the `RuntimeDefault` seccomp profile.
|
||||
|
||||
2. Install the Helm chart with the OpenShift overrides:
|
||||
|
||||
```bash
|
||||
helm install seaweedfs seaweedfs/seaweedfs \
|
||||
-n seaweedfs --create-namespace \
|
||||
-f https://raw.githubusercontent.com/seaweedfs/seaweedfs/master/k8s/charts/seaweedfs/openshift-values.yaml
|
||||
```
|
||||
|
||||
*Note: If you have already cloned the repository, you can reference the local file: `-f k8s/charts/seaweedfs/openshift-values.yaml`.*
|
||||
|
||||
For more details on the specific settings, see the comments within [openshift-values.yaml](https://github.com/seaweedfs/seaweedfs/blob/master/k8s/charts/seaweedfs/openshift-values.yaml).
|
||||
The port numbers in these commands are the `node ports` defined as part of the service spec which map to the internal container ports and to which they forward all the requests. For more information about Node Ports see https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport.
|
||||
Reference in new issue
Block a user