Answer the question
In order to leave comments, you need to log in
How to mount in minikube with virtualization?
Good afternoon,
I have a server (VPS on Ubuntu 18), minikube is installed on it with driver = kvm2, and there is a deploy:
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-php-app
spec:
replicas: 1
selector:
matchLabels:
app: web
template:
metadata:
labels:
app: web
spec:
volumes:
# Create the shared files volume to be used in both pods
- name: app-files
hostPath:
path: /opt/hw2/app
type: Directory
- name: nginx-config-volume
configMap:
name: nginx-config
containers:
- name: backend
image: nginx
imagePullPolicy: Never
ports:
- containerPort: 80
volumeMounts:
- name: app-files
mountPath: /var/www/html
- name: nginx-config-volume
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
env:
- name: DB_HOST
value: my-app-mysql
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: mysql-pass
key: password
- name: php-fpm
image: ivekov/php-fpm
imagePullPolicy: Never
volumeMounts:
- name: app-files
mountPath: /var/www/html
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question