125 lines
3.0 KiB
YAML
125 lines
3.0 KiB
YAML
|
# First, add the API
|
|||
|
apiVersion: apps/v1
|
|||
|
# This will be the deployment setup
|
|||
|
kind: Deployment
|
|||
|
metadata:
|
|||
|
# Name your Deployment here
|
|||
|
name: blazorcanvas
|
|||
|
labels:
|
|||
|
# label your deployment
|
|||
|
app: BlazorCanvas-etc
|
|||
|
spec:
|
|||
|
# The number of pods/replicas to run
|
|||
|
replicas: 2
|
|||
|
selector:
|
|||
|
matchLabels:
|
|||
|
# selector to match the pod
|
|||
|
app: BlazorCanvas-etc
|
|||
|
template:
|
|||
|
metadata:
|
|||
|
labels:
|
|||
|
# label your pod
|
|||
|
app: BlazorCanvas-etc
|
|||
|
spec:
|
|||
|
containers:
|
|||
|
# Add the container name for Kubernetes
|
|||
|
- name: blazorcanvas
|
|||
|
# Add the local image name
|
|||
|
image: blazorcanvasserver:latest
|
|||
|
# never pull the image policy
|
|||
|
imagePullPolicy: Never
|
|||
|
ports:
|
|||
|
# port for running the container, le port sur lequel l'application du conteneur roule
|
|||
|
- containerPort: 8080
|
|||
|
- containerPort: 8081
|
|||
|
# First, add the API
|
|||
|
---
|
|||
|
apiVersion: apps/v1
|
|||
|
# This will be the deployment setup
|
|||
|
kind: Deployment
|
|||
|
metadata:
|
|||
|
# Name your Deployment here
|
|||
|
name: francis-redis
|
|||
|
labels:
|
|||
|
# label your deployment
|
|||
|
app: redis-app
|
|||
|
spec:
|
|||
|
# The number of pods/replicas to run
|
|||
|
replicas: 1
|
|||
|
selector:
|
|||
|
matchLabels:
|
|||
|
# selector to match the pod
|
|||
|
app: redis-app
|
|||
|
template:
|
|||
|
metadata:
|
|||
|
labels:
|
|||
|
# label your pod
|
|||
|
app: redis-app
|
|||
|
spec:
|
|||
|
containers:
|
|||
|
# Add the container name for Kubernetes
|
|||
|
# Cette image est t<>l<EFBFBD>charg<72>e en partant BlazorCanvas.AppHost et doit passer par minikube image load.
|
|||
|
- name: redis
|
|||
|
# Add the local image name
|
|||
|
image: redis:latest
|
|||
|
# never pull the image policy
|
|||
|
imagePullPolicy: IfNotPresent
|
|||
|
ports:
|
|||
|
# ports for running the container, le port sur lequel l'application du conteneur roule
|
|||
|
- containerPort: 6379
|
|||
|
env:
|
|||
|
- name: "REDIS_ARGS"
|
|||
|
value: "--appendonly yes --appendfsync everysec"
|
|||
|
---
|
|||
|
# First, add the Service API
|
|||
|
apiVersion: v1
|
|||
|
# This will be the Service setup
|
|||
|
kind: Service
|
|||
|
metadata:
|
|||
|
# Your service name
|
|||
|
name: francis-redis
|
|||
|
spec:
|
|||
|
selector:
|
|||
|
# selector that matches the pod
|
|||
|
app: redis-app
|
|||
|
# type of service
|
|||
|
type: LoadBalancer
|
|||
|
ports:
|
|||
|
- protocol: TCP
|
|||
|
# port for exposing the service
|
|||
|
port: 6379
|
|||
|
# portfor exposing the pod
|
|||
|
targetPort: 6379
|
|||
|
# port for exposing the node
|
|||
|
nodePort: 31121
|
|||
|
---
|
|||
|
# First, add the Service API
|
|||
|
apiVersion: v1
|
|||
|
# This will be the Service setup
|
|||
|
kind: Service
|
|||
|
metadata:
|
|||
|
# Your service name
|
|||
|
name: blazorcanvas-srv
|
|||
|
spec:
|
|||
|
selector:
|
|||
|
# selector that matches the pod
|
|||
|
app: BlazorCanvas-etc
|
|||
|
# type of service
|
|||
|
type: LoadBalancer
|
|||
|
ports:
|
|||
|
- protocol: TCP
|
|||
|
name: "http"
|
|||
|
# port for exposing the service
|
|||
|
port: 8080
|
|||
|
# portfor exposing the pod
|
|||
|
targetPort: 8080
|
|||
|
# port for exposing the node
|
|||
|
nodePort: 31122
|
|||
|
- protocol: TCP
|
|||
|
name: "https"
|
|||
|
# port for exposing the service
|
|||
|
port: 8081
|
|||
|
# portfor exposing the pod
|
|||
|
targetPort: 8081
|
|||
|
# port for exposing the node
|
|||
|
nodePort: 31123
|