mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2025-02-16 10:30:47 +01:00
kubernetes
This commit is contained in:
parent
dec4694578
commit
891907bd41
0
kubernetes/templates/certificate.yaml
Normal file
0
kubernetes/templates/certificate.yaml
Normal file
41
kubernetes/templates/deployment.yaml
Normal file
41
kubernetes/templates/deployment.yaml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: appname # Name of the deployment
|
||||||
|
namespace: namespace # Name of the namespace
|
||||||
|
labels:
|
||||||
|
app: appname # Name of your application
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: appname # Name of your application
|
||||||
|
replicas: 1 # Number of replicas
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: appname # Name of your application
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
# Containers are the individual pieces of your application that you want
|
||||||
|
# to run.
|
||||||
|
- name: helloworld # Name of the container
|
||||||
|
image: helloworld:latest # The image you want to run
|
||||||
|
# resources:
|
||||||
|
# limits:
|
||||||
|
# memory: 512Mi
|
||||||
|
# cpu: "1"
|
||||||
|
# requests:
|
||||||
|
# memory: 256Mi
|
||||||
|
# cpu: "0.2"
|
||||||
|
ports:
|
||||||
|
# Ports are the ports that your application uses.
|
||||||
|
- containerPort: 8080 # The port that your application uses
|
||||||
|
volumeMounts:
|
||||||
|
# VolumeMounts are the volumes that your application uses.
|
||||||
|
- mountPath: /var/www/html # The path that your application uses
|
||||||
|
name: vol0 # Name of the volume
|
||||||
|
volumes:
|
||||||
|
# Volumes are the persistent storage that your application uses.
|
||||||
|
- name: vol0 # Name of the volume
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: pvc0 # Name of the persistent volume claim
|
0
kubernetes/templates/ingress.yaml
Normal file
0
kubernetes/templates/ingress.yaml
Normal file
0
kubernetes/templates/ingressroute-http.yaml
Normal file
0
kubernetes/templates/ingressroute-http.yaml
Normal file
0
kubernetes/templates/ingressroute-https.yaml
Normal file
0
kubernetes/templates/ingressroute-https.yaml
Normal file
27
kubernetes/templates/persistentvolumeclaim.yaml
Normal file
27
kubernetes/templates/persistentvolumeclaim.yaml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: pvc0
|
||||||
|
namespace: namespace
|
||||||
|
labels:
|
||||||
|
app: namespace
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Gi
|
||||||
|
# ---
|
||||||
|
# Digital Ocean
|
||||||
|
# storageClassName: do-block-storage
|
||||||
|
# ---
|
||||||
|
# AWS
|
||||||
|
# storageClassName: aws-ebs
|
||||||
|
# ---
|
||||||
|
# Azure
|
||||||
|
# storageClassName: azure-disk
|
||||||
|
# ---
|
||||||
|
# GCE PD
|
||||||
|
# storageClassName: gce-pd
|
||||||
|
# ---
|
||||||
|
|
32
kubernetes/templates/service.yaml
Normal file
32
kubernetes/templates/service.yaml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: servicename
|
||||||
|
namespace: namespace
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: appname
|
||||||
|
# ---
|
||||||
|
# type: ClusterIP
|
||||||
|
# ClusterIP means this service can be accessed by any pod in the cluster
|
||||||
|
# ports:
|
||||||
|
# - name: http
|
||||||
|
# port: 8080
|
||||||
|
# targetPort: 80
|
||||||
|
# protocol: TCP # optional protocol
|
||||||
|
# ---
|
||||||
|
# type: NodePort
|
||||||
|
# NodePort means this service is only accessible by pods in the same namespace
|
||||||
|
# ports:
|
||||||
|
# - name: http
|
||||||
|
# port: 80
|
||||||
|
# nodePort: 30001
|
||||||
|
# protocol: TCP # optional protocol
|
||||||
|
# ---
|
||||||
|
# type: LoadBalancer
|
||||||
|
# LoadBalancer means this service is load-balanced across all nodes in the cluster
|
||||||
|
# ports:
|
||||||
|
# - name: http
|
||||||
|
# port: 80
|
||||||
|
# targetPort: 30001
|
||||||
|
# protocol: TCP # optional protocol
|
Loading…
Reference in New Issue
Block a user