73 lines
No EOL
1.5 KiB
YAML
73 lines
No EOL
1.5 KiB
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: openbao
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: openbao
|
|
namespace: openbao
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: openbao
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: openbao
|
|
spec:
|
|
containers:
|
|
- name: openbao
|
|
image: openbao/openbao:latest # Replace with the actual image
|
|
ports:
|
|
- protocol: TCP
|
|
containerPort: 8200
|
|
# hostPort: 8200
|
|
# hostPort: 8200
|
|
# type: LoadBalancer
|
|
# env:
|
|
# - name: BAO_ADDR
|
|
# value: "http://0.0.0.0:8200"
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: openbao
|
|
namespace: openbao
|
|
spec:
|
|
selector:
|
|
app: openbao
|
|
ports:
|
|
- protocol: TCP
|
|
port: 8200
|
|
targetPort: 8200
|
|
nodePort: 30000
|
|
type: NodePort
|
|
|
|
---
|
|
|
|
# 4. Ingress (optional for HTTP-based access)
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: openbao-ingress
|
|
namespace: openbao
|
|
annotations:
|
|
nginx.ingress.kubernetes.io/rewrite-target: / # Ensures requests are rewritten to the root path
|
|
spec:
|
|
rules:
|
|
- host: localhost # Replace with your domain or host if you're using DNS
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: openbao # References the Service defined above
|
|
port:
|
|
number: 8200 # The port exposed by the Service |