Skip to content

Commit

Permalink
K8s support added
Browse files Browse the repository at this point in the history
  • Loading branch information
sebagomez committed Apr 2, 2024
1 parent f4b09af commit 4a2840d
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,20 @@ There's now a Docker Compose manifest in this repo that allows you to spin [Azur

## Kubernetes

A [deployment]() and a [service]() are available in the [k8s](./k8s/) folder. If you have `kubectl` locally configured with a cluster just apply them and you'll have an instance of Azure Storage Explorer running in your cluster.

```sh
kubectl apply -f ./k8s
```
Port-forward to a local host to easyly test your set up

```sh
kubectl port-forward svc/azurestorageexplorer 8080:8080
```
and access http://localhost:8080

### Helm

As of version 2.7.1 there's a new Helm chart with this project ready to be deployed in your favorite K8s cluster.
If you want this app to run in your cluster, make sure you have [helm](https://helm.sh/docs/intro/install/) installed on your system.

Expand All @@ -134,7 +148,7 @@ helm install azurestorageexplorer sebagomez/azurestorageexplorer

The helm chart provides a deployment and a service, you can enable port-forwarding to that service with the following command:
```sh
kubectl port-forward service/azurestorageexplorer 8080:80
kubectl port-forward service/azurestorageexplorer 8080:8080
```

or, you can follow helm instructions the get the application URL:
Expand Down
28 changes: 28 additions & 0 deletions k8s/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: azurestorageexplorer
name: azurestorageexplorer
spec:
replicas: 1
selector:
matchLabels:
app: azurestorageexplorer
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: azurestorageexplorer
spec:
containers:
- image: sebagomez/azurestorageexplorer
imagePullPolicy: Always
name: azurestorageexplorer
ports:
- containerPort: 8080
protocol: TCP
15 changes: 15 additions & 0 deletions k8s/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: azurestorageexplorer
name: azurestorageexplorer
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
app: azurestorageexplorer
sessionAffinity: None
type: ClusterIP

0 comments on commit 4a2840d

Please sign in to comment.