Fork me on GitHub
瞬间的惊奇真是种确幸,每种确幸都是支玄妙的俳句。吊桥抬起,退回到内心幽静的花园,邂逅的还是那种熟悉的冷冷清清又轰轰烈烈的美妙质感。这真令人欢喜。

httpd.yml实例

httpd.yml
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: httpd
spec:
replicas: 4
template:
metadata:
labels:
run: httpd
spec:
containers:
- name: httpd
image: httpd
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: httpd-svc
spec:
type: NodePort #nodeIP
selector:
run: httpd
ports:
- protocol: TCP
nodePort: 30000 #指定端口 访问端口
port: 8080 #ClusterIP
targetPort: 80 #PodIP

 

posted @ 2018-09-30 23:51  干嘛那么贪睡  阅读(282)  评论(0编辑  收藏  举报