Created
December 8, 2016 12:51
-
-
Save ironhouzi/ee80dd6d77a9fe3d03f7b9781503a47c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: nginxconfigmap | |
data: | |
nginxconfig: |- | |
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
server { | |
listen 80; | |
location / { | |
include /etc/nginx/uwsgi_params; | |
uwsgi_pass wpsapp:8001; | |
uwsgi_read_timeout 300; | |
keepalive_timeout 0; | |
} | |
} | |
} | |
--- | |
kind: Deployment | |
apiVersion: extensions/v1beta1 | |
metadata: | |
name: wps | |
labels: | |
name: wps | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: wps | |
spec: | |
containers: | |
- image: nginx | |
name: nginx | |
ports: | |
- containerPort: 80 | |
volumeMounts: | |
- mountPath: /etc/nginx | |
name: config | |
volumes: | |
- name: config | |
configMap: | |
name: nginxconfigmap | |
items: | |
- key: nginxconfig | |
path: nginx.conf | |
--- | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: wps | |
labels: | |
name: wps | |
spec: | |
ports: | |
- port: 80 | |
name: http | |
targetPort: 80 | |
selector: | |
app: wps | |
type: LoadBalancer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment