#!/bin/bash apiVersion: v1 kind: Service metadata: name: nginx-service spec: selector: app: nginx ports: - name: http port: 80 targetPort: 80 type: ClusterIP --- apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx-container image: nginx volumeMounts: - name: nginx-pvc mountPath: /usr/share/nginx/html volumes: - name: nginx-pvc persistentVolumeClaim: claimName: nginx-pvc nodeSelector: kubernetes.io/hostname: worker1,worker2,worker3 --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: nginx-pvc spec: storageClassName: basic1 accessModes: - ReadWriteOnce resources: requests: storage: 50Gi
whaust
2023年2月20日 星期一
[K8s YAML] nginx yaml 產生範例
K8s Yaml 檔, 目的在於產生 nginx 服務 , 固定運行在 worker1 , worker2 , worker3 三個 node , 三個 node , pvc 的空間要 50G , storage class 為 basic1
訂閱:
張貼留言 (Atom)
Popular
-
При планировании проекта разработки программного обеспечения я часто сталкиваюсь с помощником, который задает мне вопрос: в чем разница межд...
-
Question 1 of 10 Which type of cyberattack sends extremely high volumes of network traffic such as packets, data, or transactions that rend...
-
今天你的老爸我將談論兩種技術,Cisco vPC: Virtual Port Channel (虛擬端口通道) 和 VSS:Virtual Switching system (虛擬交換系統)。 這兩種技術在各自領域的工作方式不同。 你們不用一直Google去查,我在這兒把它們之...
沒有留言:
張貼留言