mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-27 19:16:16 +00:00
Example: a pod like the below should
proxy port 53 TCP and UDP to the main DNS service.
```
apiVersion: v1
kind: Pod
metadata:
name: localhost-dns-proxy
spec:
containers:
- name: proxy-udp
image: gcr.io/google_containers/proxy-to-service:v1
args: [ "udp", "53", "kube-dns.default" ]
ports:
- name: udp
protocol: UDP
containerPort: 53
hostPort: 53
- name: proxy-tcp
image: gcr.io/google_containers/proxy-to-service:v1
args: [ "tcp", "53", "kube-dns.default" ]
ports:
- name: tcp
protocol: TCP
containerPort: 53
hostPort: 53
```
18 lines
384 B
Makefile
18 lines
384 B
Makefile
# Makefile for the Docker image proxy-to-service
|
|
# MAINTAINER: Tim Hockin <thockin@google.com>
|
|
# If you update this image please bump the tag value before pushing.
|
|
|
|
.PHONY: all container push
|
|
|
|
TAG = v1
|
|
PREFIX = gcr.io/google_containers
|
|
NAME = proxy-to-service
|
|
|
|
all: container
|
|
|
|
container:
|
|
docker build -t $(PREFIX)/$(NAME):$(TAG) .
|
|
|
|
push:
|
|
gcloud docker push $(PREFIX)/$(NAME):$(TAG)
|