Trying to do:
helm upgrade --namespace keycloak -f k8s/sandbox/values.yaml keycloak codecentric/keycloak
Getting:
UPGRADE FAILED: cannot patch "keycloak-http" with kind Service: Service "keycloak-http" is invalid: [spec.ports[0].nodePort: Forbidden: may not be used when `type` is 'ClusterIP', spec.ports[1].nodePort: Forbidden: may not be used when `type` is 'ClusterIP']
However, initial values is NodePort, not ClusterIP:
service:
# Annotations for headless and HTTP Services
annotations: {}
# Additional labels for headless and HTTP Services
labels: {}
# key: value
# The Service type
type: NodePort
Also kubectl edit shows type: NodePort
spec:
clusterIP: <SomeIP>
externalTrafficPolicy: Cluster
ports:
- name: http
nodePort: 31062
port: 80
protocol: TCP
targetPort: http
- name: https
nodePort: 31258
port: 8443
protocol: TCP
targetPort: https
- name: http-management
nodePort: 32113
port: 9990
protocol: TCP
targetPort: http-management
selector:
app.kubernetes.io/instance: keycloak
app.kubernetes.io/name: keycloak
sessionAffinity: None
type: NodePort
Here is the keycloak-http service from helm template
. For some reason it says ClusterIp, but both the inital values.yaml says NodePort and also kubectl edit service keycloak-http say it is NodePort:
# Source: keycloak/templates/service-http.yaml
apiVersion: v1
kind: Service
metadata:
name: keycloak-http
labels:
helm.sh/chart: keycloak-10.1.0
app.kubernetes.io/name: keycloak
app.kubernetes.io/instance: keycloak
app.kubernetes.io/version: "12.0.4"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: http
spec:
type: ClusterIP
ports:
- name: http
port: 80
targetPort: http
protocol: TCP
- name: https
port: 8443
targetPort: https
protocol: TCP
- name: http-management
port: 9990
targetPort: http-management
protocol: TCP
selector:
app.kubernetes.io/name: keycloak
app.kubernetes.io/instance: keycloak
Any ideas?
helm template
and paste the service part from it? – acid_fujihelm template
output was too long for a comment, so I pasted it into the original question. It shows ClusterIP although both the initial values andkubectl edit
shows NodePort. – globus68