add ingress yaml for k8s
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1beta1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: frontend
|
name: gorush
|
||||||
spec:
|
spec:
|
||||||
replicas: 3
|
replicas: 3
|
||||||
template:
|
template:
|
||||||
@@ -14,7 +14,7 @@ spec:
|
|||||||
- name: gorush
|
- name: gorush
|
||||||
image: appleboy/gorush
|
image: appleboy/gorush
|
||||||
command: ["/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:
|
env:
|
||||||
- name: GET_HOSTS_FROM
|
- name: GET_HOSTS_FROM
|
||||||
# value: dns
|
# value: dns
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: frontend
|
name: gorush
|
||||||
labels:
|
labels:
|
||||||
app: gorush
|
app: gorush
|
||||||
tier: frontend
|
tier: frontend
|
||||||
spec:
|
spec:
|
||||||
# if your cluster supports it, uncomment the following to automatically create
|
# if your cluster supports it, uncomment the following to automatically create
|
||||||
# an external load-balanced IP for the frontend service.
|
# an external load-balanced IP for the frontend service.
|
||||||
type: LoadBalancer
|
# type: LoadBalancer
|
||||||
ports:
|
ports:
|
||||||
- port: 8088
|
- port: 8088
|
||||||
selector:
|
selector:
|
||||||
|
|||||||
10
k8s/ingress.yaml
Normal file
10
k8s/ingress.yaml
Normal file
@@ -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
|
apiVersion: extensions/v1beta1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: redis-master
|
name: redis
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
template:
|
template:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: redis-master
|
name: redis
|
||||||
labels:
|
labels:
|
||||||
app: redis
|
app: redis
|
||||||
role: master
|
role: master
|
||||||
|
|||||||
Reference in New Issue
Block a user