标签:描述 标签 data mys c中 ide name ati class
apiVersion: v1
kind: ReplicationController
metadata:
name: myweb
spec: //spec中是对RC对象的具体描述
replicas: 5
selector:
app: myweb
template:
metadata:
labels: //选择器,用来选择对象的
app: myweb //我选择了标签为app: myweb的pod
spec: //对pod模版的具体描述
containers:
- image: kubeguide/tomcat-app:v1 16
name: myweb
resources:
limits:
cpu: "2"
memory: 4Gi
ports: 22
- containerPort: 8080
env:
- name: MYSQL_SERVICE_HOST
value: ‘mysql‘
- name: MYSQL_SERVICE_PORT
value: ‘3306‘
kubernetes 比较好的案例-创建tomcat-mysql集群
标签:描述 标签 data mys c中 ide name ati class
原文地址:https://www.cnblogs.com/hixiaowei/p/8799034.html