docker icon indicating copy to clipboard operation
docker copied to clipboard

Mysql & Nginx issue while running Plesk docker on Kubernetes

Open peanutpi opened this issue 8 years ago • 2 comments

Description

  • I am trying to run this (plesk/plesk:latest) docker container on my kuberntes v1.7.8-gke.0 running on Google Container engine.
  • The issue I am facing is that plesk redirect me to login page after few second of browsing on plesk dashboard.
  • Following is my deployment & service
apiVersion: v1
kind: Service
metadata:
  name: plesk
  labels:
    app: plesk
spec:
  selector:
    app: plesk
  ports:
  - port: 8880
    targetPort: port-8880
    name: port-8880
  - port: 21
    targetPort: port-21
    name: port-21
  - port: 80
    targetPort: port-80
    name: port-80
  - port: 443
    targetPort: port-443
    name: port-443
  - port: 8443
    targetPort: port-8443
    name: port-8443
  - port: 8447
    targetPort: port-8447
    name: port-8447
  type: LoadBalancer

---

apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: plesk
spec:
  replicas: 1
  progressDeadlineSeconds: 300
  template:
    metadata:
      labels:
        app: plesk
    spec:
      containers:
      - name: plesk
        image: plesk/plesk
        ports:
        - name: port-8880
          containerPort: 8880
        - name: port-21
          containerPort: 21
        - name: port-80
          containerPort: 80
        - name: port-443
          containerPort: 443
        - name: port-8443
          containerPort: 8443
        - name: port-8447
          containerPort: 8447
  • But when I start the container on kubernetee, Mysql & Nginx as not started properly.
  • For Mysql I've to run find /var/lib/mysql -type f -exec touch {} \; after exec in the pods.
  • For Nginx I've followed https://support.plesk.com/hc/en-us/articles/213933865-Nginx-failed-to-start-99-Cannot-assign-requested-address-
  1. Sync IP addresses between Plesk and OS. For that go to Tools & Settings > IP Addresses > Reread IP
  2. Select Repair to fix missing IP in the interface or Remove if it is no longer required.
  3. Enable nginx service:
# /usr/local/psa/admin/bin/nginxmng -e
  • On step 2 when I click on repair, it's showing me following error
Error: ifmng failed: Execution of /sbin/ip addr add 172.17.0.3/255.255.0.0 dev eth0 label eth0:1 failed with return code 2. Stderr is RTNETLINK answers: Operation not permitted
  • The issue I am facing is that plesk redirect me to login page after few second of browsing on plesk dashboard.

  • This issues never came when I ran the same on my Ubuntu 16.04 Host machine using plain docker. using following command

docker run -d -P plesk/plesk

peanutpi avatar Dec 23 '17 08:12 peanutpi

Hey from further debugging I found following,

In my local the storage driver is : aufs on kubernetes storage driver is : overlay

peanutpi avatar Dec 23 '17 09:12 peanutpi

Currently plesk in docker is not intended to production usage. Please, use it as described in readme file.

mrsombre avatar Oct 04 '18 17:10 mrsombre