Update the yaml for attu install on k8s

Signed-off-by: Bennu-Li <yunmei.li@zilliz.com>
This commit is contained in:
Bennu-Li
2022-07-18 18:58:41 +08:00
parent 925e844190
commit cd6f627f60
3 changed files with 45 additions and 43 deletions

View File

@@ -14,23 +14,6 @@ spec:
selector:
app: attu
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-attu-ingress
spec:
rules:
- host: my-attu.local
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: my-attu-svc
port:
number: 3000
---
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -49,12 +32,12 @@ spec:
spec:
containers:
- name: attu
image: zilliz/attu:latest
imagePullPolicy: Always
image: zilliz/attu:v2.1.0
imagePullPolicy: IfNotPresent
ports:
- name: attu
containerPort: 3000
protocol: TCP
env:
- name: HOST_URL
value: http://my-attu.local
- name: MILVUS_URL
value: 127.0.0.1:19530

View File

@@ -32,26 +32,38 @@ Attu only supports Milvus 2.x.
kubectl apply -f https://github.com/zilliztech/attu/blob/main/attu-k8s-deploy.yaml
```
2. Check the established Ingress.
2. Check the status of the running pods.
```shell
kubectl get ingress
kubectl get pod
```
Get the following output:
```
NAME CLASS HOSTS ADDRESS PORTS AGE
my-attu-ingress <none> my-attu.local 10.100.32.1,10.100.32.2,10.100.32.3 80 19h
NAME READY STATUS RESTARTS AGE
my-attu-0 1/1 Running 0 30s
```
3. Configure DNS on the device that requires the Attu service
mapping the path `my-attu.local` onto any of the addresses returned above in the system file `/etc/hosts`.
3. Check the service of Attu
```shell
10.100.32.1 my-attu.local
kubectl get svc
```
4. Visit `http://my-attu.local` in the browser, and enter the address of the Milvus service.
Get the following output:
```shell
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
my-attu-svc ClusterIP 10.96.0.1 <none> 3000/TCP 40s
```
4. Connect to Attu service
Open a new terminal and run the following command to forward the local port to the port that Attu uses.
```undefined
$ kubectl port-forward service/my-attu-svc 3000
```
Visit `http://127.0.0.1:3000` in the browser, and enter the address of the Milvus service.

View File

@@ -31,35 +31,42 @@ Attu 只支持 Milvus 2.x。
kubectl apply -f https://github.com/zilliztech/attu/blob/main/attu-k8s-deploy.yaml
```
2. 检查启动的 ingress 资源
2. 检查启动的 Attu pod 的运行状态
```shell
kubectl get ingress
kubectl get pod
```
将获得以下输出:
```
NAME CLASS HOSTS ADDRESS PORTS AGE
my-attu-ingress <none> my-attu.local 10.100.32.1,10.100.32.2,10.100.32.3 80 19h
NAME READY STATUS RESTARTS AGE
my-attu-0 1/1 Running 0 30s
```
3. 在需要访问 attu 服务的机器上配置 DNS
在系统文件 `/etc/hosts` 中将路径 `my-attu.local` 映射为上述输出中 my-attu-ingress 对应的 ADDRESS 中的任意一地址。
3. 查看 Attu 服务
```shell
10.100.32.1 my-attu.local
kubectl get svc
```
将获得以下输出:
```shell
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
my-attu-svc ClusterIP 10.96.0.1 <none> 3000/TCP 40s
```
4. 在浏览器中访问 `http://my-attu.local`, 在页面框中输入想要访问的 Milvus 服务地址,即可查看对应的 Milvus 服务。
4. 连接 Attu 服务
打开一个新的终端,通过运行一下命令,以便在本地访问 attu 服务。
```undefined
$ kubectl port-forward service/my-attu-svc 3000
```
在浏览器中访问 `http://127.0.0.1:3000`, 在页面框中输入想要访问的 Milvus 服务地址,即可查看对应的 Milvus 服务。