Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Coredns
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
Coredns
Commits
838427c9
Commit
838427c9
authored
Feb 22, 2017
by
John Belamaric
Committed by
Miek Gieben
Feb 22, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deployment helpers that are now in coredns/deployment/kubernetes (#554)
parent
703f5161
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
122 deletions
+3
-122
middleware/kubernetes/README.md
middleware/kubernetes/README.md
+3
-10
middleware/kubernetes/coredns.yaml.sed
middleware/kubernetes/coredns.yaml.sed
+0
-93
middleware/kubernetes/deploy.sh
middleware/kubernetes/deploy.sh
+0
-19
No files found.
middleware/kubernetes/README.md
View file @
838427c9
...
...
@@ -128,14 +128,7 @@ all values. The labels that accept wildcards are:
*
multiple wild cards are allowed in a single query.
*
e.g.
`A`
Request
`*.*.svc.zone.`
or
`SRV`
request
`*.*.*.*.svc.zone.`
##
deploy.sh and coredns.yaml.sed
##
Deployment in Kubernetes
A convenience script to generate a manifest for running CoreDNS on a cluster that is currently
running standard kube-dns. It creates a ConfigMap and a CoreDNS deployment, then updates the
Kube-DNS service selector to use the CoreDNS deployment. It doesn't delete the kube-dns
deployment or replication controller - you'll have to do that manually.
~~~
$ ./deploy.sh 10.3.0.0/24 | kubectl apply -f -
$ kubectl delete --namespace=kube-system deployment kube-dns
~~~
See the
[
deployment
](
https://github.com/coredns/deployment
)
repository for details on how
to deploy CoreDNS in Kubernetes.
middleware/kubernetes/coredns.yaml.sed
deleted
100644 → 0
View file @
703f5161
a
piVersion: v1
k
i
nd: ConfigMap
met
a
data:
na
me: coredns
na
mespace: kube-system
da
ta:
Coref
i
le: |
.:53
{
error
s
log stdout
health
kuber
n
ete
s
CLUSTER_DOMAIN
{
c
idrs SERVICE_CIDR
}
p
ro
xy
.
/etc/resolv.conf
c
ache 30
}
---
a
piVersion: extensions/v1beta1
k
i
nd: Deployment
met
a
data:
na
me: coredns
na
mespace: kube-system
la
bels:
k8
s
-
app: coredns
kubernetes
.
io/cluster
-
service: "true"
kubernetes.io/name: "CoreDNS"
spec:
replicas: 1
selector:
matchLabels:
k8s
-
a
pp: coredns
tem
pla
te:
met
a
data:
la
bels:
k8
s
-
app: coredns
annotations:
scheduler
.
alpha
.
kubernetes
.
io/critical
-
pod: ''
scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
spec:
containers:
-
na
me: coredns
i
mage: coredns/coredns:latest
i
magePullPolicy: Always
a
rgs: [ "-conf", "/etc/coredns/Corefile" ]
vo
l
umeMou
n
t
s
:
- name
:
config-volume
mountPath
:
/
etc
/
c
oredns
p
ort
s
:
- containerPort
:
53
name
:
dns
protocol: UDP
- containerPort: 53
na
me: dns-tcp
p
roto
c
ol: TCP
li
venessProbe:
h
tt
pG
et
:
path:
/
h
e
a
lth
p
ort
:
8080
s
c
heme: HTTP
initialDelaySe
c
onds: 60
timeoutSe
c
o
nds
:
5
successThreshold
:
1
failureThreshold
:
5
dns
P
olicy: Default
volumes:
- name: config-volume
configMap:
name: coredns
items:
- key: Corefile
path: Corefile
---
apiVersion: v1
kind: Service
metadata:
name: kube-dns
namespace: kube-system
labels:
k8s-app: coredns
kubernetes
.
io/cluster-service: "true"
kubernetes
.
io/name: "CoreDNS"
spec:
selector:
k8s-app: coredns
clusterI
P
: CLUSTER_DNS_I
P
p
ort
s
:
- name
:
dns
port
:
53
p
roto
c
ol: UDP
-
na
me: dns-tcp
p
ort
:
53
p
roto
c
ol: TCP
middleware/kubernetes/deploy.sh
deleted
100755 → 0
View file @
703f5161
#!/bin/bash
# Deploys CoreDNS to a cluster currently running Kube-DNS.
SERVICE_CIDR
=
$1
CLUSTER_DOMAIN
=
${
2
:-
cluster
.local
}
YAML_TEMPLATE
=
${
3
:-
`
pwd
`
/coredns.yaml.sed
}
YAML
=
${
4
:-
`
pwd
`
/coredns.yaml
}
if
[[
-z
$SERVICE_CIDR
]]
;
then
echo
"Usage:
$0
SERVICE-CIDR [ CLUSTER-DOMAIN ] [ YAML-TEMPLATE ] [ YAML ]"
exit
1
fi
CLUSTER_DNS_IP
=
$(
kubectl get service
--namespace
kube-system kube-dns
-o
jsonpath
=
"{.spec.clusterIP}"
)
sed
-e
s/CLUSTER_DNS_IP/
$CLUSTER_DNS_IP
/g
-e
s/CLUSTER_DOMAIN/
$CLUSTER_DOMAIN
/g
-e
s?SERVICE_CIDR?
$SERVICE_CIDR
?g
$YAML_TEMPLATE
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment