Skip to content

Instantly share code, notes, and snippets.

@afonsoaugusto
Last active April 14, 2019 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afonsoaugusto/fd5354ef50eb39a9b14110af9aacd4f7 to your computer and use it in GitHub Desktop.
Save afonsoaugusto/fd5354ef50eb39a9b14110af9aacd4f7 to your computer and use it in GitHub Desktop.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: giropops-v1
spec:
replicas: 10
template:
metadata:
labels:
app: giropops
version: "1.0.0"
annotatons:
prometheus.io/scrape: "true"
prometheus.io/port: "32111"
spec:
containers:
- name: giropops
image: linuxtips/nginx-prometheus-exporter:1.0.0
env:
- name: VERSION
value: "1.0.0"
ports:
- containerPort: 80
- containerPort: 32111
apiVersion: v1
kind: Service
metadata:
labels:
app: giropops
run: nginx
track: stable
name: giropops
namespace: default
spec:
externalTrafficPolicy: Cluster
ports:
- nodePort: 32222
name: http
port: 80
protocol: TCP
targetPort: 80
- nodePort: 32111
name: prometheus
port: 32111
protocol: TCP
targetPort: 32111
selector:
app: giropops
sessionAffinity: None
type: NodePort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment