i have mysql service on Rancher Kubernetes Engine and need to access via Nodeport for remote purpose. i already try with other service like elasticsearch and grafana dashboard and can be access via nodeport why mysql can't
here my service
kind: Service
metadata:
labels:
app: mysql
service: mysql
name: proxy-mysql-service
namespace: x4-s24
spec:
type: NodePort
selector:
app: mysql
ports:
- name: tcp-transfer
port: 3306
targetPort: 3306
nodePort: 30036
statefulset
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mysql
namespace: x4-s24
labels:
app: mysql
spec:
replicas: 1
updateStrategy:
type: OnDelete
serviceName: proxy-mysql-service
selector:
matchLabels:
app: mysql
template:
metadata:
labels:
app: mysql
spec:
priorityClassName: high-priority
containers:
- image: mysql:8.0.26
imagePullPolicy: Always
name: mysql
resources:
requests:
memory: 512Mi
cpu: 200m
ports:
- containerPort: 3306
name: tcp-mysql
protocol: TCP
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: mysql-secret
key: mysql-password-root
volumeMounts:
- name: mysql
mountPath: /var/lib/mysql
- name: mysql-config
mountPath: /etc/mysql/my.cnf
subPath: my.cnf
volumes:
- name: mysql
persistentVolumeClaim:
claimName: mysql-8-pv
- name: mysql-config
configMap:
name: mysql-configmap2
already add bind-address = 0.0.0.0 on my.cnf but still not working