k8s部署zookeeper
1、zookeeper_rc文件内容如下:cat zookeeper-rc.yamlapiVersion: v1kind: ReplicationControllermetadata:name: zookeeper-testspec:replicas: 1selector:app: zookeeper-testtemplate:m...
·
1、zookeeper_rc文件内容如下:
cat zookeeper-rc.yaml
apiVersion: v1
kind: ReplicationController
metadata:
name: zookeeper-test
spec:
replicas: 1
selector:
app: zookeeper-test
template:
metadata:
labels:
app: zookeeper-test
spec:
containers:
- name: zookeeper-test
image: 192.168.1.201:5000/zookeeper
ports:
- containerPort: 2181
ports:
- containerPort: 2888
2、zookeeper_svc文件内容如下
cat zookeeper-svc.yaml
apiVersion: v1
kind: Service
metadata:
name: zookeeper
spec:
type: NodePort
ports:
- port: 2181
nodePort: 30005
selector:
app: zookeeper
</div>
更多推荐
已为社区贡献3条内容
所有评论(0)