Skip to content

Commit

Permalink
Merge pull request #309 from Jayclifford345/main
Browse files Browse the repository at this point in the history
Adding Kubernetes Deployment Documentation
  • Loading branch information
shanghaikid authored Nov 8, 2023
2 parents 65679ef + d167fde commit d101007
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ docker run -p 8000:3000 -e MILVUS_URL={milvus server IP}:19530 zilliz/attu:v2.3.

Make sure that the Attu container can access the Milvus IP address. After starting the container, open your web browser and enter `http://{ Attu IP }:8000` to view the Attu GUI.

### Running Attu within Kubernetes

Before you begin, make sure that you have Milvus installed and running within your [K8's Cluster](https://milvus.io/docs/install_cluster-milvusoperator.md). Note that Attu only supports Milvus 2.x.

Here are the steps to start a container for running Attu:

```code
kubectl apply -f https://raw.githubusercontent.com/zilliztech/attu/main/attu-k8s-deploy.yaml
```

Make sure that the Attu pod can access the Milvus service. In the example provided this connects directly to `my-release-milvus:19530`. Change this based on the Milvus service name. A more flexible way to achieve this would be to introduce a `ConfigMap`. See this [example]("https://raw.githubusercontent.com/zilliztech/attu/main/examples/attu-k8s-deploy-ConfigMap.yaml") for details.

#### Parameters for Docker CLI

| Parameter | Example | Required | Description |
Expand Down
2 changes: 1 addition & 1 deletion attu-k8s-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ spec:
protocol: TCP
env:
- name: MILVUS_URL
value: 127.0.0.1:19530
value: "my-release-milvus:19530"
53 changes: 53 additions & 0 deletions examples/attu-k8s-deploy-ConfigMap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
apiVersion: v1
kind: Service
metadata:
name: my-attu-svc
labels:
app: attu
spec:
type: ClusterIP
ports:
- name: attu
protocol: TCP
port: 3000
targetPort: 3000
selector:
app: attu
---
apiVersion: v1
kind: ConfigMap
metadata:
name: milvus-config
data:
milvus_url: "<SERVICE>:<PORT>"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-attu
labels:
app: attu
spec:
replicas: 1
selector:
matchLabels:
app: attu
template:
metadata:
labels:
app: attu
spec:
containers:
- name: attu
image: zilliz/attu:v2.3.1
imagePullPolicy: IfNotPresent
ports:
- name: attu
containerPort: 3000
protocol: TCP
env:
- name: MILVUS_URL
valueFrom:
configMapKeyRef:
name: milvus-config
key: milvus_url

0 comments on commit d101007

Please sign in to comment.