Hi @lokio
It would have helped if you had shared the manifests for all the resources you created in the required namespace.
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
run: iron-gallery
name: iron-gallery-service-datacenter
namespace: iron-namespace-datacenter
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
nodePort: 32678
selector:
app: iron-gallery
type: NodePort
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
db: mariadb
name: iron-db-deployment-datacenter
namespace: iron-namespace-datacenter
spec:
replicas: 1
selector:
matchLabels:
db: mariadb
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
db: mariadb
spec:
containers:
- image: kodekloud/irondb:2.0
name: iron-db-container-datacenter
volumeMounts:
- name: db
mountPath: /var/lib/mysql
env:
- name: MYSQL_DATABASE
value: database_web
- name: MYSQL_ROOT_PASSWORD
value: r007P@ssword
- name: MYSQL_PASSWORD
value: S3cureP@ssword
- name: MYSQL_USER
value: db_user
volumes:
- name: db
emptyDir: {}
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
run: iron-gallery
name: iron-gallery-deployment-datacenter
namespace: iron-namespace-datacenter
spec:
replicas: 1
selector:
matchLabels:
run: iron-gallery
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
run: iron-gallery
spec:
containers:
- image: kodekloud/irongallery:2.0
name: iron-gallery-container-datacenter
resources:
limits:
memory: “100Mi”
cpu: “50m”
volumeMounts:
- name: config
mountPath: /usr/share/nginx/html/data
- name: images
mountPath: /usr/share/nginx/html/uploads
volumes:
- name: config
emptyDir: {}
- name: images
emptyDir: {}
these are all my codes
I verified this lab, and it worked fine at my end.
The manifests you shared appear to be fine, but the DB Service of type ClusterIP is missing.
Did you create it?
yeah i made db service , the error is the nodePort is not working properly
