xcad2k 4 年 前
コミット
891907bd41

+ 0 - 0
kubernetes/certificates/letsencrypt-issuer-prod.yaml


+ 0 - 0
kubernetes/certificates/letsencrypt-issuer-staging.yaml


+ 0 - 0
kubernetes/templates/certificate.yaml


+ 41 - 0
kubernetes/templates/deployment.yaml

@@ -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 - 0
kubernetes/templates/ingress.yaml


+ 0 - 0
kubernetes/templates/ingressroute-http.yaml


+ 0 - 0
kubernetes/templates/ingressroute-https.yaml


+ 0 - 0
kubernetes/templates/ingressroute-redirectscheme.yaml


+ 27 - 0
kubernetes/templates/persistentvolumeclaim.yaml

@@ -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 - 0
kubernetes/templates/service.yaml

@@ -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