Add basic yaml files

This commit is contained in:
Tanguy Herbron 2022-02-22 19:12:42 +01:00
parent 7a1c4982f6
commit f6a3119da7
5 changed files with 73 additions and 0 deletions

13
certificate.yaml Normal file
View File

@ -0,0 +1,13 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: kubernetes-dashboard
namespace: kubernetes-dashboard
spec:
secretName: certificate-test-dashboard
dnsNames:
- test-cluser-dashboard.localhost
issuerRef:
name: clusterissuer-le
kind: ClusterIssuer

View File

@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: admin-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: admin-user
namespace: kubernetes-dashboard

View File

@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kubernetes-dashboard

28
ingress.yaml Normal file
View File

@ -0,0 +1,28 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: kubernetes-dashboard
namespace: kubernetes-dashboard
labels:
k3s-app: kubernetes-dashboard
annotations:
nginx.ingress.kubernetes.io/backend-protocol: "https"
nginx.ingress.kubernetes.io/rewrite-target: /
cert-manager.io/issuer: clusterissuer-le
spec:
ingressClassName: nginx
tls:
- hosts:
- test-cluster-dashboard.localhost
secretName: certificate-test-dashboard
rules:
- host: test-cluster-dashboard.localhost
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: kubernetes-dashboard
port:
number: 443

15
letsencrypt.yaml Normal file
View File

@ -0,0 +1,15 @@
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: cluserissuer-le
namespace: kubernetes-dashboard
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: tanguy.herbron@outlook.com
privateKeySecretRef:
name: letsencrypt-test
solvers:
- http01:
ingress:
class: traefik