Skip to content

Instantly share code, notes, and snippets.

@Hounddog
Created October 16, 2015 13:18
Show Gist options
  • Save Hounddog/86ea22b144c2a598b239 to your computer and use it in GitHub Desktop.
Save Hounddog/86ea22b144c2a598b239 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Service
metadata:
name: ci-jenkins
labels:
name: ci-jenkins
spec:
# if your cluster supports it, uncomment the following to automatically create
# an external load-balanced IP for the frontend service.
#type: LoadBalancer
ports:
# the port that this service should serve on
- name: http
port: 80
targetPort: 8080
- name: slave
port: 49187
targetPort: 49187
selector:
name: ci-jenkins
apiVersion: v1
kind: Service
metadata:
name: nginx-app-proxy
labels:
name: nginx-app-proxy
spec:
# if your cluster supports it, uncomment the following to automatically create
# an external load-balanced IP for the frontend service.
type: LoadBalancer
ports:
# the port that this service should serve on
- name: http
port: 80
selector:
name: nginx-app-proxy
server {
listen 80;
server_name jenkins.elephone.com;
location / {
proxy_pass http://jenkins;
add_header X-Upstream "http://jenkins";
}
}
upstream jenkins {
server ci-jenkins;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment