Commit ebdfba7c by lixinyi

K8S配置更改

parent 73469306
......@@ -17,11 +17,12 @@ spec:
version: v1
spec:
containers:
- image: rdwh/eurekaserver:latest
name: eureka-server
command: ['sh','-c','sh ./bin/startup.sh && sleep 3600']
ports:
- containerPort: 8769
- image: rdwh/eurekaserver:latest
name: eureka-server
command: ['sh','-c','sh ./bin/startup.sh && sleep 3600']
ports:
- containerPort: 8769
serviceAccountName: eureka-server-test
---
apiVersion: v1
kind: Service
......@@ -32,10 +33,32 @@ metadata:
namespace: devops
spec:
ports:
- port: 8769
protocol: TCP
targetPort: 8769
nodePort: 30092
- port: 8769
protocol: TCP
targetPort: 8769
nodePort: 30092
selector:
app: eureka-server
type: NodePort
\ No newline at end of file
type: NodePort
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: eureka-server-test #ClusterRoleBinding的名字
subjects:
- kind: ServiceAccount
name: eureka-server-test #serviceaccount资源对象的name
namespace: devops #serviceaccount的namespace
roleRef:
kind: ClusterRole
name: cluster-admin #k8s集群中最高权限的角色
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: eureka-server-test # ServiceAccount的名字
namespace: devops # serviceaccount的namespace
labels:
app: eureka-server-test #ServiceAccount的标签
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment