• 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.

    • This topic was modified 2 weeks, 6 days ago by bcworkz. Reason: remove NSFW tag
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    It’s a near certainty that install.php never even gets a chance to execute. You’re blocked by server configuration before you ever get to install.php. These forums are principally for WP specific issues. Server configurations are really beyond these forums purview. None the less, help can sometimes be found here for common server setups such as nginx or straight Apache. Expertise in container schemes like yours or Docker is very limited to non-existent.

    You will likely be better off seeking advice in a forum dedicated to Kubernetes configuration. Your issue isn’t so much about accessing install.php. It’s about executing any .php file in /wp-admin/.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.