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
c3d3ff28
Commit
c3d3ff28
authored
Aug 28, 2016
by
Miek Gieben
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'cleanup-for-release'
parents
0c57748b
676dc919
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
51 deletions
+32
-51
conf/chaosCorefile
conf/chaosCorefile
+0
-4
conf/etcdCorefile
conf/etcdCorefile
+0
-10
conf/k8sCorefile
conf/k8sCorefile
+0
-25
middleware/kubernetes/README.md
middleware/kubernetes/README.md
+32
-12
No files found.
conf/chaosCorefile
deleted
100644 → 0
View file @
0c57748b
.:1053 authors.bind:1053 {
chaos CoreDNS-001 "Miek Gieben" miek@miek.nl
proxy . 8.8.8.8:53
}
conf/etcdCorefile
deleted
100644 → 0
View file @
0c57748b
.:1053 {
etcd skydns.local {
stubzones
path /skydns
endpoint http://localhost:2379
upstream 8.8.8.8:53 8.8.4.4:53
debug
}
proxy . 8.8.8.8:53
}
conf/k8sCorefile
deleted
100644 → 0
View file @
0c57748b
# Serve on port 53
.:53 {
# use kubernetes middleware for domain "coredns.local"
kubernetes coredns.local {
# Kubernetes data API resync period
# Example values: 60s, 5m, 1h
resyncperiod 5m
# Use url for k8s API endpoint
endpoint http://localhost:8080
# Assemble k8s record names with the template
template {service}.{namespace}.{zone}
# Only expose the k8s namespace "demo"
namespaces demo
# Only expose the records for kubernetes objects
# that matches this label selector. The label
# selector syntax is described in the kubernetes
# API documentation: http://kubernetes.io/docs/user-guide/labels/
# Example selector below only exposes objects tagged as
# "application=nginx" in the staging or qa environments.
#labels environment in (staging, qa),application=nginx
}
# Perform DNS response caching for the coredns.local zone
# Cache timeout is provided by the integer in seconds
#cache 180 coredns.local
}
middleware/kubernetes/README.md
View file @
c3d3ff28
...
...
@@ -117,14 +117,34 @@ with services running in those namespaces. The automated kubernetes integration
#### Launch CoreDNS
Build CoreDNS and launch using the configuration file in
`conf/k8sCorefile`
.
This configuration file sets up CoreDNS to use the zone
`coredns.local`
for
the kubernetes services.
Build CoreDNS and launch using this configuration file:
~~~
txt
# Serve on port 53
.:53 {
kubernetes coredns.local {
resyncperiod 5m
endpoint http://localhost:8080
template {service}.{namespace}.{zone}
namespaces demo
# Only expose the records for kubernetes objects
# that matches this label selector.
# See http://kubernetes.io/docs/user-guide/labels/
# Example selector below only exposes objects tagged as
# "application=nginx" in the staging or qa environments.
#labels environment in (staging, qa),application=nginx
}
#cache 180 coredns.local # optionally enable caching
}
~~~
Put it in
`~/k8sCorefile`
for instance. This configuration file sets up CoreDNS to use the zone
`coredns.local`
for the kubernetes services.
The command to launch CoreDNS is:
~~~
$ ./coredns -conf
conf/k8sCoreF
ile
$ ./coredns -conf
~/k8sCoref
ile
~~~
In a separate terminal a DNS query can be issued using dig:
...
...
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