1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
| cat kubernetes-deployment.yaml --- apiVersion: v1 kind: Service metadata: annotations: derrick.service.type: nodeport derrick.version: 0.0.14 labels: derrick.service: lucas name: lucas spec: ports: - name: "8080" port: 8080 targetPort: 8080 selector: derrick.service: lucas type: LoadBalancer --- apiVersion: apps/v1 kind: Deployment metadata: annotations: derrick.version: 0.0.14 labels: derrick.service: lucas name: lucas spec: selector: matchLabels: derrick.service: lucas replicas: 1 template: metadata: labels: derrick.service: lucas spec: nodeSelector: kubernetes.io/hostname: k8s-01 tolerations: - key: node-role.kubernetes.io/master operator: Exists containers: - image: registry.cn-hangzhou.aliyuncs.com/ringtail/lucas:0.0.2 name: web ports: - containerPort: 8080 env: - name: CA_FILE value: /etc/kubernetes/pki/etcd/ca.pem - name: CERT_FILE value: /etc/kubernetes/pki/etcd/etcd.pem - name: KEY_FILE value: /etc/kubernetes/pki/etcd/etcd-key.pem - name: ENDPOINTS value: "https://192.168.220.100:2379,https://192.168.220.101:2379,https://192.168.220.102:2379" volumeMounts: - mountPath: /etc/kubernetes/pki/etcd name: etcd-certs-0 readOnly: true volumes: - hostPath: path: /etc/kubernetes/pki/etcd type: DirectoryOrCreate name: etcd-certs-0
|