Cluster information:
Kubernetes version: 1.31.1
Installation method: along woth talos
Host OS: Talos
Hi guys.
I have my little talos cluster on a turingPI - and had a struggle to get it up and running for now.
After cluster is created I’ve deployed flux, backportet cilium and will now add a simple MySQL server for Kodi here at home.
Using Flux to deploy the MySQL Server - and everything looks fine - no error anywhere. But there just not throughput from the MySQL Container to the service IP and port.
After creating the pods etc - I’m deploying it through flux, and all look good, no error in log, and all are green. But the MySQL port is not open on the IP - but are on the pod, where logs saying nothing about issues
Service says fine
So I can not figure out what is wrong here since every instance says everything is correct and working here, But unfortunably no port upon for connecting to the MySQL
The used files for kustomizations are:
namespace.yaml
---
apiVersion: v1
kind: Namespace
metadata:
name: tv
labels:
pod-security.kubernetes.io/enforce: privileged
pod-security.kubernetes.io/enforce-version: latest
kodi-secret.yaml
---
## Creating the MySQL password
apiVersion: v1
kind: Secret
metadata:
name: kodi-mysql-secret
namespace: tv
type: kubernetes.io/basic-auth
stringData:
password: XXXXXXXX
---
## Creating the MySQL ROOT password
apiVersion: v1
kind: Secret
metadata:
name: kodi-mysql-root-secret
namespace: tv
type: kubernetes.io/basic-auth
stringData:
password: XXXXXXXXXX
kodi-sql-volume.yaml
---
# Allocate the volume
apiVersion: v1
kind: PersistentVolume
metadata:
name: kodi-mysql-pv-volume
labels:
type: nfs-production
spec:
storageClassName: nfs-storage-production
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/var/storage/production"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: kodi-mysql-pv-claim
namespace: tv
spec:
storageClassName: nfs-storage-production
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
kodi-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: kodi-mysql
namespace: tv
spec:
selector:
matchLabels:
app: mysql
replicas: 1
strategy:
type: Recreate
template:
metadata:
labels:
app: mysql
spec:
containers:
- env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: kodi-mysql-root-secret
image: mysql:latest
name: mysql
ports:
- containerPort: 3306
name: mysql
protocol: TCP
volumeMounts:
- name: kodi-mysql-persistent-storage
mountPath: /var/lib/mysql
volumes:
- name: kodi-mysql-persistent-storage
persistentVolumeClaim:
claimName: kodi-mysql-pv-claim
And finally kodi-service.yaml
---
apiVersion: v1
kind: Service
metadata:
name: kodi-mysql-service
namespace: tv
spec:
selector:
app: mysql
type: LoadBalancer
externalIPs:
- 172.16.40.25
ports:
- protocol: TCP
port: 3306
targetPort: 3306
status:
loadBalancer: {}