kuebrnetes

Kubernetes 服务定义示例

--- kind: List apiVersion: v1 items: - kind: ReplicationController apiVersion: v1 metadata: name: rc-nginx-meta labels: name: rc-nginx spec: replicas: 1 # 必须跟 template 里面的 labels 匹配 selector: name: pod-nginx template: metadata: labels: name: pod-nginx spec: containers: - name: nginx-docker-images image: nginx:1.10 # 开放端口数组 ports: - containerPort: 80 protocol: TCP # 环境变量数组 env: - name: NGINX_PORT