Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to initialize mysql container when created on openshift 3.11? #270

Open
imranrazakhan opened this issue Oct 19, 2019 · 2 comments
Open

Comments

@imranrazakhan
Copy link

I want to set initial data on MySQL of container. As per doc they recommend following way but its not working

apiVersion: extensions/v1beta1
kind: Pod
metadata:
  name: mysql
spec:
  containers:
  - name: mysql
    image: mysql        
    ports:
      - containerPort: 3306
    volumeMounts:
      - name: mysql-initdb
        mountPath: /docker-entrypoint-initdb.d
  volumes:
    - name: mysql-initdb
      configMap:
        name: mysql-initdb-config
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: mysql-initdb-config
data:
  initdb.sql: |
..... script here ....
@IvanSivric
Copy link

/docker-entrypoint-initdb.d works only with official mysql image. There is not such mechanism with redhat version...

@phracek
Copy link
Member

phracek commented Apr 17, 2024

@imranrazakhan Please see our Templates examples in the example directory.

Is this issue also reproducible in OpenShift 4 environment? If not, please close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants