Created
January 20, 2016 22:36
-
-
Save v1k0d3n/edcb706072701311a61d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
name: kube-dns-v10 | |
namespace: kube-system | |
labels: | |
k8s-app: kube-dns | |
version: v10 | |
kubernetes.io/cluster-service: "true" | |
spec: | |
replicas: 1 | |
selector: | |
k8s-app: kube-dns | |
version: v10 | |
template: | |
metadata: | |
labels: | |
k8s-app: kube-dns | |
version: v10 | |
kubernetes.io/cluster-service: "true" | |
spec: | |
containers: | |
- name: etcd | |
image: gcr.io/google_containers/etcd:2.0.9 | |
resources: | |
# keep request = limit to keep this container in guaranteed class | |
limits: | |
cpu: 100m | |
memory: 50Mi | |
requests: | |
cpu: 100m | |
memory: 50Mi | |
command: | |
- /usr/local/bin/etcd | |
- -data-dir | |
- /var/etcd/data | |
- -listen-client-urls | |
- http://127.0.0.1:2379,http://127.0.0.1:4001 | |
- -advertise-client-urls | |
- http://127.0.0.1:2379,http://127.0.0.1:4001 | |
- -initial-cluster-token | |
- skydns-etcd | |
volumeMounts: | |
- name: etcd-storage | |
mountPath: /var/etcd/data | |
- name: kube2sky | |
image: gcr.io/google_containers/kube2sky:1.12 | |
resources: | |
# keep request = limit to keep this container in guaranteed class | |
limits: | |
cpu: 100m | |
memory: 50Mi | |
requests: | |
cpu: 100m | |
memory: 50Mi | |
args: | |
# command = "/kube2sky" | |
- -domain=cluster.local | |
- name: skydns | |
image: gcr.io/google_containers/skydns:2015-10-13-8c72f8c | |
resources: | |
# keep request = limit to keep this container in guaranteed class | |
limits: | |
cpu: 100m | |
memory: 50Mi | |
requests: | |
cpu: 100m | |
memory: 50Mi | |
args: | |
# command = "/skydns" | |
- -machines=http://127.0.0.1:4001 | |
- -addr=0.0.0.0:53 | |
- -ns-rotate=false | |
- -domain=cluster.local. | |
ports: | |
- containerPort: 53 | |
name: dns | |
protocol: UDP | |
- containerPort: 53 | |
name: dns-tcp | |
protocol: TCP | |
livenessProbe: | |
httpGet: | |
path: /healthz | |
port: 8080 | |
scheme: HTTP | |
initialDelaySeconds: 30 | |
timeoutSeconds: 5 | |
readinessProbe: | |
httpGet: | |
path: /healthz | |
port: 8080 | |
scheme: HTTP | |
initialDelaySeconds: 1 | |
timeoutSeconds: 5 | |
- name: healthz | |
image: gcr.io/google_containers/exechealthz:1.0 | |
resources: | |
# keep request = limit to keep this container in guaranteed class | |
limits: | |
cpu: 10m | |
memory: 20Mi | |
requests: | |
cpu: 10m | |
memory: 20Mi | |
args: | |
- -cmd=nslookup kubernetes.default.svc.cluster.local 127.0.0.1 >/dev/null | |
- -port=8080 | |
ports: | |
- containerPort: 8080 | |
protocol: TCP | |
volumes: | |
- name: etcd-storage | |
emptyDir: {} | |
dnsPolicy: Default # Don't use cluster DNS. |
Author
v1k0d3n
commented
Jan 20, 2016
apiVersion: v1
kind: Service
metadata:
name: kube-dns
namespace: kube-system
labels:
k8s-app: kube-dns
kubernetes.io/cluster-service: "true"
kubernetes.io/name: "KubeDNS"
spec:
selector:
k8s-app: kube-dns
clusterIP: 10.254.0.10
ports:
- name: dns
port: 53
protocol: UDP
- name: dns-tcp
port: 53
protocol: TCP
[fedora@kubemaster ~]$ kubectl exec -it busybox -c busybox -- sh
/ # nslookup kube-ui.kube-system.svc.cluster.local
Server: 10.254.0.10
Address 1: 10.254.0.10
nslookup: can't resolve 'kube-ui.kube-system.svc.cluster.local'
/ #
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment