made kubernetes files woooo
This commit is contained in:
parent
631c7c9fae
commit
419712115a
@ -3,7 +3,7 @@ FROM rust:latest
|
|||||||
RUN cargo install mdbook
|
RUN cargo install mdbook
|
||||||
RUN apt-get update && apt-get install -y vim git
|
RUN apt-get update && apt-get install -y vim git
|
||||||
|
|
||||||
RUN mkdir -p /mdbook
|
COPY ./blog /mdbook/
|
||||||
WORKDIR /mdbook
|
WORKDIR /mdbook
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
17
blog-balance.yaml
Normal file
17
blog-balance.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: blog-balancer
|
||||||
|
labels:
|
||||||
|
app: blog-balancer
|
||||||
|
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
ports:
|
||||||
|
- name: blog-balancer
|
||||||
|
port: 80
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 3000
|
||||||
|
selector:
|
||||||
|
app: blog-dep
|
||||||
|
sessionAffinity: None
|
22
blog-deploy.yaml
Normal file
22
blog-deploy.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: blog-dep
|
||||||
|
labels:
|
||||||
|
app: blog-dep
|
||||||
|
spec:
|
||||||
|
replicas: 2
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: blog-dep
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: blog-dep
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mdblog
|
||||||
|
image: docker.scalz.cloud/blog
|
||||||
|
ports:
|
||||||
|
- containerPort: 3000
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
services:
|
|
||||||
mdbook:
|
|
||||||
build: .
|
|
||||||
container_name: mdbook
|
|
||||||
volumes:
|
|
||||||
- "./blog:/mdbook"
|
|
||||||
ports:
|
|
||||||
- 80:3000
|
|
||||||
restart: always
|
|
Loading…
Reference in New Issue
Block a user