Skip to content

Commit e61dcb2

Browse files
author
RobuRishabh
committed
Deployed_on_minikube
1 parent b32a008 commit e61dcb2

File tree

4 files changed

+69
-0
lines changed

4 files changed

+69
-0
lines changed

deployment.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: flight-assistant
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: flight-assistant
10+
template:
11+
metadata:
12+
labels:
13+
app: flight-assistant
14+
spec:
15+
containers:
16+
- name: flight-assistant
17+
image: roburishabh/flight-assistant:latest
18+
ports:
19+
- containerPort: 8501
20+
env:
21+
- name: OLLAMA_URL
22+
value: "http://ollama-service:11434"
23+
- name: OLLAMA_MODEL
24+
value: "llama2:latest"

ollama-deployment.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: ollama
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: ollama
10+
template:
11+
metadata:
12+
labels:
13+
app: ollama
14+
spec:
15+
containers:
16+
- name: ollama
17+
image: ollama/ollama:latest
18+
ports:
19+
- containerPort: 11434
20+
command: ["/bin/sh", "-c"]
21+
args: ["ollama serve & sleep 5 && ollama pull llama2:latest && tail -f /dev/null"]

ollama-service.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: ollama-service
5+
spec:
6+
selector:
7+
app: ollama
8+
ports:
9+
- protocol: TCP
10+
port: 11434
11+
targetPort: 11434
12+
type: ClusterIP

service.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: flight-assistant-service
5+
spec:
6+
selector:
7+
app: flight-assistant
8+
ports:
9+
- protocol: TCP
10+
port: 8501 #80
11+
targetPort: 8501
12+
type: LoadBalancer

0 commit comments

Comments
 (0)