mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-22 00:03:16 +01:00
updates
This commit is contained in:
parent
2e5b99f923
commit
8dd15d834c
@ -3,6 +3,10 @@ kind: ClusterIssuer
|
||||
metadata:
|
||||
name: acme-issuer
|
||||
spec:
|
||||
# -- (Choice) Self-signed Issuer
|
||||
# selfSigned: {}
|
||||
# -- or --
|
||||
# -- (Choice) ACME Issuer
|
||||
acme:
|
||||
# Configure your email here...
|
||||
# ---
|
@ -6,6 +6,10 @@ metadata:
|
||||
# ---
|
||||
# namespace: your-namespace
|
||||
spec:
|
||||
# -- (Choice) Self-signed Issuer
|
||||
# selfSigned: {}
|
||||
# -- or --
|
||||
# -- (Choice) ACME Issuer
|
||||
acme:
|
||||
# Configure your email here...
|
||||
# ---
|
@ -1,6 +0,0 @@
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: ClusterIssuer
|
||||
metadata:
|
||||
name: selfsigned-issuer
|
||||
spec:
|
||||
selfSigned: {}
|
@ -1,9 +0,0 @@
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Issuer
|
||||
metadata:
|
||||
name: selfsigned-issuer
|
||||
# (Optional) Metadata
|
||||
# ---
|
||||
# namespace: your-namespace
|
||||
spec:
|
||||
selfSigned: {}
|
@ -1,14 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: cloudflare-api-key-secret
|
||||
namespace: cert-manager
|
||||
type: Opaque
|
||||
stringData:
|
||||
# Configure your API Key or Credentials here...
|
||||
# ---
|
||||
# API Key:
|
||||
# api-key: your-api-key
|
||||
# - or -
|
||||
# Token:
|
||||
# api-token: your-api-token
|
0
kubernetes/examples/example-configmap.yaml
Normal file
0
kubernetes/examples/example-configmap.yaml
Normal file
0
kubernetes/examples/example-deployment.yaml
Normal file
0
kubernetes/examples/example-deployment.yaml
Normal file
0
kubernetes/examples/example-ingress.yaml
Normal file
0
kubernetes/examples/example-ingress.yaml
Normal file
0
kubernetes/examples/example-namespace.yaml
Normal file
0
kubernetes/examples/example-namespace.yaml
Normal file
0
kubernetes/examples/example-peristentvolume.yaml
Normal file
0
kubernetes/examples/example-peristentvolume.yaml
Normal file
0
kubernetes/examples/example-secret.yaml
Normal file
0
kubernetes/examples/example-secret.yaml
Normal file
0
kubernetes/examples/example-service.yaml
Normal file
0
kubernetes/examples/example-service.yaml
Normal file
@ -1,28 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nginx-http-cm
|
||||
data:
|
||||
# key: value
|
||||
# file: |
|
||||
# content
|
||||
# ---
|
||||
nginx.conf: |
|
||||
user nginx;
|
||||
worker_processes 1;
|
||||
events {
|
||||
worker_connections 10240;
|
||||
}
|
||||
http {
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
location /test {
|
||||
return 401;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-http
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx-http
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx-http
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx-http
|
||||
image: nginx:1.27.2
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: 80
|
||||
volumeMounts:
|
||||
- name: nginx-http-cm
|
||||
mountPath: /etc/nginx
|
||||
- name: nginx-http-vol
|
||||
mountPath: /usr/share/nginx/html
|
||||
volumes:
|
||||
- name: nginx-http-cm
|
||||
configMap:
|
||||
name: nginx-http-cm
|
||||
- name: nginx-http-vol
|
||||
hostPath:
|
||||
path: /var/nginxserver
|
@ -1,15 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nginx-http-svc
|
||||
labels:
|
||||
app: nginx-http
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- port: 30080
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: nginx-http
|
@ -1,17 +0,0 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: nginx
|
||||
namespace: wp-clcreative
|
||||
spec:
|
||||
rules:
|
||||
- host: portainer.your-domain.com
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: portainer
|
||||
port:
|
||||
number: 9000
|
@ -1,12 +0,0 @@
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: your-certificate
|
||||
namespace: your-namespace
|
||||
spec:
|
||||
secretName: your-secret
|
||||
issuerRef:
|
||||
name: ssl-issuer
|
||||
kind: ClusterIssuer
|
||||
dnsNames:
|
||||
- your-hostname
|
@ -1,33 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mysql
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mysql
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mysql
|
||||
spec:
|
||||
containers:
|
||||
- image: mysql:5.7
|
||||
name: mysql
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mysql-secret
|
||||
key: root-pass
|
||||
ports:
|
||||
- name: mysql
|
||||
containerPort: 3306
|
||||
# volumeMounts:
|
||||
# - name: mysql-vol
|
||||
# mountPath: /var/lib/mysql
|
||||
# volumes:
|
||||
# - name: mysql-vol
|
||||
# hostPath:
|
||||
# path: /var/mysql-data
|
@ -1,7 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: mysql-secret
|
||||
type: Opaque
|
||||
stringData:
|
||||
root-pass: test123
|
@ -1,28 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nginx-http-cm
|
||||
data:
|
||||
# key: value
|
||||
# file: |
|
||||
# content
|
||||
# ---
|
||||
nginx.conf: |
|
||||
user nginx;
|
||||
worker_processes 1;
|
||||
events {
|
||||
worker_connections 10240;
|
||||
}
|
||||
http {
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
location /test {
|
||||
return 401;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-http
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx-http
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx-http
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx-http
|
||||
image: nginx
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: 80
|
||||
volumeMounts:
|
||||
- name: nginx-http-cm
|
||||
mountPath: /etc/nginx
|
||||
- name: nginx-http-vol
|
||||
mountPath: /usr/share/nginx/html
|
||||
volumes:
|
||||
- name: nginx-http-cm
|
||||
configMap:
|
||||
name: nginx-http-cm
|
||||
- name: nginx-http-vol
|
||||
hostPath:
|
||||
path: /var/nginxserver
|
@ -1,15 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nginx-http-svc
|
||||
labels:
|
||||
app: nginx-http
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- port: 30080
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: nginx-http
|
@ -1,27 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nginx-https-cm
|
||||
data:
|
||||
nginx.conf: |
|
||||
user nginx;
|
||||
worker_processes 1;
|
||||
events {
|
||||
worker_connections 10240;
|
||||
}
|
||||
http {
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
|
||||
server_name _;
|
||||
|
||||
ssl_certificate /etc/nginx/ssl/server-cert.pem;
|
||||
ssl_certificate_key /etc/nginx/ssl/server-key.pem;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-https
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx-https
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx-https
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx-https
|
||||
image: nginx
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: 80
|
||||
- name: secureweb
|
||||
containerPort: 443
|
||||
volumeMounts:
|
||||
- name: nginx-https-cm
|
||||
mountPath: /etc/nginx
|
||||
- name: nginx-https-secret
|
||||
mountPath: /etc/nginx/ssl
|
||||
readOnly: true
|
||||
- name: nginx-https-vol
|
||||
mountPath: /usr/share/nginx/html
|
||||
volumes:
|
||||
- name: nginx-https-cm
|
||||
configMap:
|
||||
name: nginx-https-cm
|
||||
- name: nginx-https-secret
|
||||
secret:
|
||||
secretName: nginx-https-secret
|
||||
- name: nginx-https-vol
|
||||
hostPath:
|
||||
path: /var/nginxserver
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nginx-https-cm
|
||||
data:
|
||||
nginx.conf: |
|
||||
user nginx;
|
||||
worker_processes 1;
|
||||
events {
|
||||
worker_connections 10240;
|
||||
}
|
||||
http {
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
|
||||
server_name _;
|
||||
|
||||
ssl_certificate /etc/nginx/ssl/server-cert.pem;
|
||||
ssl_certificate_key /etc/nginx/ssl/server-key.pem;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: nginx-https-secret
|
||||
type: Opaque
|
||||
stringData:
|
||||
server-cert.pem: |
|
||||
-----BEGIN CERTIFICATE-----
|
||||
...
|
||||
-----END CERTIFICATE-----
|
||||
server-key.pem: |
|
||||
|
@ -1,19 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nginx-https-svc
|
||||
labels:
|
||||
app: nginx-https
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- port: 31080
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
name: http
|
||||
- port: 31443
|
||||
targetPort: 443
|
||||
protocol: TCP
|
||||
name: https
|
||||
selector:
|
||||
app: nginx-https
|
@ -1,41 +0,0 @@
|
||||
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
|
@ -1,18 +0,0 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ingress # Name of the ingress object
|
||||
namespace: namespace # Name of the namespace
|
||||
spec:
|
||||
rules:
|
||||
- host: "your-hostname.com" # Your hostname
|
||||
http:
|
||||
paths:
|
||||
# Path-based routing settings:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: your-service-name # The name of the service
|
||||
port:
|
||||
number: 80 # Service Portnumber
|
@ -1,4 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: your-namespace
|
@ -1,29 +0,0 @@
|
||||
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
|
||||
# ---
|
||||
# CIVO
|
||||
# storageClassName: civo-volume
|
||||
# ---
|
@ -1,11 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: civo
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: civo-volume
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
@ -1,27 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: civo-web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: civo-web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: civo-web
|
||||
spec:
|
||||
containers:
|
||||
- name: civo-web
|
||||
image: nginx
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: 80
|
||||
volumeMounts:
|
||||
- name: civo
|
||||
mountPath: /usr/share/nginx/html
|
||||
volumes:
|
||||
- name: civo
|
||||
persistentVolumeClaim:
|
||||
claimName: civo
|
@ -1,27 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: local-web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: local-web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: local-web
|
||||
spec:
|
||||
containers:
|
||||
- name: local-web
|
||||
image: nginx
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: 80
|
||||
volumeMounts:
|
||||
- name: local
|
||||
mountPath: /usr/share/nginx/html
|
||||
volumes:
|
||||
- name: local
|
||||
hostPath:
|
||||
path: /var/nginxserver
|
@ -1,13 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: nfs
|
||||
spec:
|
||||
capacity:
|
||||
storage: 500Mi
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: nfs
|
||||
nfs:
|
||||
server: 192.168.1.7
|
||||
path: "/srv/nfs"
|
@ -1,11 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: nfs
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: nfs
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
@ -1,27 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nfs-web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nfs-web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nfs-web
|
||||
spec:
|
||||
containers:
|
||||
- name: nfs-web
|
||||
image: nginx
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: 80
|
||||
volumeMounts:
|
||||
- name: nfs
|
||||
mountPath: /usr/share/nginx/html
|
||||
volumes:
|
||||
- name: nfs
|
||||
persistentVolumeClaim:
|
||||
claimName: nfs
|
@ -1,32 +0,0 @@
|
||||
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
|
@ -1,35 +0,0 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: wp-clcreative
|
||||
namespace: wp-clcreative
|
||||
annotations:
|
||||
# (Optional): Annotations for the Ingress Controller
|
||||
# -- ingress class is needed when traefik is not the default
|
||||
# kubernetes.io/ingress.class: traefik
|
||||
# ---
|
||||
# -- entrypoint and tls configurations
|
||||
# traefik.ingress.kubernetes.io/router.entrypoints: web, websecure
|
||||
# traefik.ingress.kubernetes.io/router.tls: "true"
|
||||
# ---
|
||||
# -- optional middlewares
|
||||
# traefik.ingress.kubernetes.io/router.middlewares:your-middleware@kubernetescrd
|
||||
# ---
|
||||
spec:
|
||||
rules:
|
||||
- host: "your-hostname"
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: your-service-name
|
||||
port:
|
||||
number: 80
|
||||
# (Optional) TLS settings
|
||||
# tls:
|
||||
# - hosts:
|
||||
# - your-hostname.com # Your hostname
|
||||
# secretName: your-secret # Your TLS Secret
|
||||
# ---
|
Loading…
Reference in New Issue
Block a user