From d7193dc17a5a4bfadb227264ec1d835ed6f992d6 Mon Sep 17 00:00:00 2001 From: suyiiyii Date: Fri, 6 Dec 2024 16:43:24 +0800 Subject: [PATCH] init --- deployment.yaml | 24 ++++++++++++++++++++++++ ingress.yaml | 39 +++++++++++++++++++++++++++++++++++++++ issuer.yaml | 14 ++++++++++++++ service.yaml | 11 +++++++++++ 4 files changed, 88 insertions(+) create mode 100644 deployment.yaml create mode 100644 ingress.yaml create mode 100644 issuer.yaml create mode 100644 service.yaml diff --git a/deployment.yaml b/deployment.yaml new file mode 100644 index 0000000..f8c6a68 --- /dev/null +++ b/deployment.yaml @@ -0,0 +1,24 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + creationTimestamp: null + labels: + app: ds-design + name: ds-design +spec: + replicas: 1 + selector: + matchLabels: + app: ds-design + strategy: {} + template: + metadata: + creationTimestamp: null + labels: + app: ds-design + spec: + containers: + - image: registry.cn-shenzhen.aliyuncs.com/suyiiyii/ds-design:1 + name: ds-design + resources: {} +status: {} diff --git a/ingress.yaml b/ingress.yaml new file mode 100644 index 0000000..77ad815 --- /dev/null +++ b/ingress.yaml @@ -0,0 +1,39 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: ds-design-ingress + annotations: + cert-manager.io/issuer: letsencrypt-issuer +spec: + tls: + - hosts: + - ds-design.kl.suyiiyii.top + secretName: ds-design-tls + rules: + - host: ds-design.kl.suyiiyii.top + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: ds-design-service + port: + number: 80 +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: ds-design-ingress-http +spec: + rules: + - host: ds-design.kl.suyiiyii.top + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: ds-design-service + port: + number: 80 \ No newline at end of file diff --git a/issuer.yaml b/issuer.yaml new file mode 100644 index 0000000..d003b35 --- /dev/null +++ b/issuer.yaml @@ -0,0 +1,14 @@ +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + name: letsencrypt-issuer +spec: + acme: + server: https://acme-v02.api.letsencrypt.org/directory + email: suyiiyii@gmail.com + privateKeySecretRef: + name: letsencrypt-issuer-key + solvers: + - http01: + ingress: + class: traefik diff --git a/service.yaml b/service.yaml new file mode 100644 index 0000000..bd31a71 --- /dev/null +++ b/service.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: ds-design-service +spec: + selector: + app: ds-design + ports: + - protocol: TCP + port: 80 + targetPort: 8000