Cannot access /wp-admin/install.php
-
I have deployed WordPress on Kubernetes using the wordpress:6.7.2-apache image. Currently, I’m not using a load balancer for external traffic and want to initialize WordPress (
/wp-admin/install.php
) using port forwarding. However, I’m unable to connect – experiencing timeouts and HTTP 500 errors. Additionally, I don’t see any tables being created in MySQL.I’d like to know if there are any misconfigurations in my Kubernetes setup or if I’m missing something important.
Below are my Kubernetes configurations using
kustomization
for patches:- Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: COMPONENT_NAME
spec:
template:
metadata:
labels:
sidecar.istio.io/inject: "false"
spec:
securityContext:
fsGroup: 0
serviceAccountName: SERVICE_ACCOUNT_NAME
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.gke.io/zone
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app: COMPONENT_NAME
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- COMPONENT_NAME
topologyKey: "topology.kubernetes.io/zone"
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cloud.google.com/gke-nodepool
operator: In
values:
- web
containers:
- name: COMPONENT_NAME
image: wordpress:6.7.2-apache
ports:
- name: http
containerPort: 80
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
readinessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 30
periodSeconds: 10
livenessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 30
periodSeconds: 10
securityContext:
allowPrivilegeEscalation: true
runAsUser: 0
volumeMounts:
- name: wordpress-data
mountPath: /var/www/html
volumes:
- name: wordpress-data
persistentVolumeClaim:
claimName: COMPONENT_NAME- PVC
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: COMPONENT_NAME
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi- Service
apiVersion: v1
kind: Service
metadata:
name: COMPONENT_NAME
annotations:
cloud.google.com/neg: NEG
spec:
ports:
- name: http
port: 8080
targetPort: 80
selector:
app: COMPONENT_NAME
type: ClusterIP
Please let me know if any additional informations are needed.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.