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
5166d9dd
Commit
5166d9dd
authored
Feb 25, 2022
by
Chris O'Haver
Committed by
GitHub
Feb 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
briefly doc env vars and import substitution (#5207)
Signed-off-by:
Chris O'Haver
<
cohaver@infoblox.com
>
parent
66dc74ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
README.md
README.md
+22
-2
No files found.
README.md
View file @
5166d9dd
...
@@ -110,7 +110,7 @@ on port `53` and enables `whoami` plugin is:
...
@@ -110,7 +110,7 @@ on port `53` and enables `whoami` plugin is:
~~~
~~~
Sometimes port number 53 is occupied by system processes. In that case you can start the CoreDNS server
Sometimes port number 53 is occupied by system processes. In that case you can start the CoreDNS server
while modifying the
Corefile
as given below so that the CoreDNS server starts on port 1053.
while modifying the
`Corefile`
as given below so that the CoreDNS server starts on port 1053.
~~~
corefile
~~~
corefile
.:1053 {
.:1053 {
...
@@ -118,9 +118,29 @@ while modifying the Corefile as given below so that the CoreDNS server starts on
...
@@ -118,9 +118,29 @@ while modifying the Corefile as given below so that the CoreDNS server starts on
}
}
~~~
~~~
If you have a
Corefile
without a port number specified it will, by default, use port 53, but you can
If you have a
`Corefile`
without a port number specified it will, by default, use port 53, but you can
override the port with the
`-dns.port`
flag:
`coredns -dns.port 1053`
, runs the server on port 1053.
override the port with the
`-dns.port`
flag:
`coredns -dns.port 1053`
, runs the server on port 1053.
You may import other text files into the
`Corefile`
using the _import_ directive. You can use globs to match multiple
files with a single _import_ directive.
~~~
txt
.:53 {
import example1.txt
}
import example2.txt
~~~
You can use environment variables in the
`Corefile`
with
`{$VARIABLE}`
. Note that each environment variable is inserted
into the
`Corefile`
as a single token. For example, an environment variable with a space in it will be treated as a single
token, not as two separate tokens.
~~~
txt
.:53 {
{$ENV_VAR}
}
~~~
A Corefile for a CoreDNS server that forward any queries to an upstream DNS (e.g.,
`8.8.8.8`
) is as follows:
A Corefile for a CoreDNS server that forward any queries to an upstream DNS (e.g.,
`8.8.8.8`
) is as follows:
~~~
corefile
~~~
corefile
...
...
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