Expose ports on KSM for K3s

This commit is contained in:
Carlos de Paula 2019-08-20 17:45:42 -03:00
parent b6cdf80843
commit 5c19ad2ab2
3 changed files with 18 additions and 4 deletions

View File

@ -84,6 +84,15 @@ local vars = import 'vars.jsonnet';
'--port=8080',
'--telemetry-port=8081',
],
ports: [
{
containerPort: 8080,
name: 'http-main'
},
{
containerPort: 8081,
name: 'http-self'
}],
}
else
c,
@ -100,12 +109,12 @@ local vars = import 'vars.jsonnet';
ports: [{
name: 'http-main',
port: 8080,
targetPort: '8080'
targetPort: 'http-main'
},
{
name: 'http-self',
port: 8081,
targetPort: '8081'
targetPort: 'http-self'
}]
}
},

View File

@ -21,6 +21,11 @@ spec:
- --telemetry-port=8081
image: carlosedp/kube-state-metrics:v1.7.2
name: kube-state-metrics
ports:
- containerPort: 8080
name: http-main
- containerPort: 8081
name: http-self
resources:
limits:
cpu: 100m

View File

@ -10,9 +10,9 @@ spec:
ports:
- name: http-main
port: 8080
targetPort: "8080"
targetPort: http-main
- name: http-self
port: 8081
targetPort: "8081"
targetPort: http-self
selector:
app: kube-state-metrics