|
@@ -0,0 +1,48 @@
|
|
|
|
|
+apiVersion: v1
|
|
|
|
|
+kind: Service
|
|
|
|
|
+metadata:
|
|
|
|
|
+ name: my-service
|
|
|
|
|
+ namespace: my-namespace
|
|
|
|
|
+ labels:
|
|
|
|
|
+ app: my-app
|
|
|
|
|
+spec:
|
|
|
|
|
+ type: LoadBalancer
|
|
|
|
|
+ selector:
|
|
|
|
|
+ app: my-app
|
|
|
|
|
+ ports:
|
|
|
|
|
+ - protocol: TCP
|
|
|
|
|
+ port: 80
|
|
|
|
|
+ targetPort: 7777
|
|
|
|
|
+---
|
|
|
|
|
+apiVersion: apps/v1
|
|
|
|
|
+kind: Deployment
|
|
|
|
|
+metadata:
|
|
|
|
|
+ name: my-deployment
|
|
|
|
|
+ namespace: my-namespace
|
|
|
|
|
+ labels:
|
|
|
|
|
+ app: my-app
|
|
|
|
|
+spec:
|
|
|
|
|
+ replicas: 10
|
|
|
|
|
+ selector:
|
|
|
|
|
+ matchLabels:
|
|
|
|
|
+ app: my-app
|
|
|
|
|
+ template:
|
|
|
|
|
+ metadata:
|
|
|
|
|
+ labels:
|
|
|
|
|
+ app: my-app
|
|
|
|
|
+ spec:
|
|
|
|
|
+ affinity:
|
|
|
|
|
+ nodeAffinity:
|
|
|
|
|
+ requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
|
+ nodeSelectorTerms:
|
|
|
|
|
+ - matchExpressions:
|
|
|
|
|
+ - key: beta.kubernetes.io/arch
|
|
|
|
|
+ operator: In
|
|
|
|
|
+ values:
|
|
|
|
|
+ - amd64
|
|
|
|
|
+ - arm64
|
|
|
|
|
+ containers:
|
|
|
|
|
+ - name: nginx
|
|
|
|
|
+ image: 134898497215.dkr.ecr.cn-northwest-1.amazonaws.com.cn/xc:q1server
|
|
|
|
|
+ ports:
|
|
|
|
|
+ - containerPort: 7777
|