add ingress yaml for k8s
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
7dac7d0698
commit
8e98e0b6fe
|
@ -1,7 +1,7 @@
|
|||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend
|
||||
name: gorush
|
||||
spec:
|
||||
replicas: 3
|
||||
template:
|
||||
|
@ -14,7 +14,7 @@ spec:
|
|||
- name: gorush
|
||||
image: appleboy/gorush
|
||||
command: ["/gorush"]
|
||||
args: ["-c", "config.yml", "-e", "redis", "--redis-addr", "redis-master:6379"]
|
||||
args: ["-c", "config.yml", "-e", "redis", "--redis-addr", "redis:6379"]
|
||||
env:
|
||||
- name: GET_HOSTS_FROM
|
||||
# value: dns
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend
|
||||
name: gorush
|
||||
labels:
|
||||
app: gorush
|
||||
tier: frontend
|
||||
spec:
|
||||
# if your cluster supports it, uncomment the following to automatically create
|
||||
# an external load-balanced IP for the frontend service.
|
||||
type: LoadBalancer
|
||||
# type: LoadBalancer
|
||||
ports:
|
||||
- port: 8088
|
||||
selector:
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: gorush
|
||||
annotations:
|
||||
http.port: "8089"
|
||||
spec:
|
||||
backend:
|
||||
serviceName: gorush
|
||||
servicePort: 8088
|
|
@ -1,7 +1,7 @@
|
|||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-master
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-master
|
||||
name: redis
|
||||
labels:
|
||||
app: redis
|
||||
role: master
|
||||
|
|
Loading…
Reference in New Issue