Split php and nginx manifests

This commit is contained in:
2024-11-24 01:00:22 +07:00
parent 3f46922637
commit 0e06dd91d4
2 changed files with 47 additions and 24 deletions

View File

@@ -33,30 +33,6 @@ spec:
mountPath: /var/www/rock
ports:
- containerPort: 8080
- name: php
image: localhost:5001/php:5.3-2
volumeMounts:
- name: src-rock
mountPath: /var/www/rock
ports:
- containerPort: 9000
env:
- name: TZ
value: "Asia/Bangkok"
---
apiVersion: v1
kind: Service
metadata:
name: rock-php-fpm
namespace: rock
spec:
selector:
app: nginx
ports:
- protocol: TCP
port: 9000
targetPort: 9000
---
apiVersion: v1

47
k8s/app/php.yml Normal file
View File

@@ -0,0 +1,47 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: php-fpm
namespace: rock
labels:
app: php-fpm
spec:
replicas: 3
selector:
matchLabels:
app: php-fpm
template:
metadata:
labels:
app: php-fpm
spec:
volumes:
- name: src-rock
hostPath:
path: /srv/src/legacy_www/rock
containers:
- name: php
image: git.picklesniffers.com/rock.ru/php:5.3-6
volumeMounts:
- name: src-rock
mountPath: /var/www/rock
ports:
- containerPort: 9000
env:
- name: TZ
value: "Asia/Bangkok"
---
apiVersion: v1
kind: Service
metadata:
name: rock-php-fpm
namespace: rock
spec:
selector:
app: php-fpm
ports:
- protocol: TCP
port: 9000
targetPort: 9000