Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
da46d04f
Commit
da46d04f
authored
Mar 04, 2015
by
Clayton Coleman
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5024 from rsokolowski/doc-fixit-empty-service-selector
Explain what are services without endpoints used for.
parents
fdea7252
af0ade51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
services.md
docs/services.md
+33
-0
No files found.
docs/services.md
View file @
da46d04f
...
...
@@ -50,6 +50,39 @@ TCP port 9376 on any `pod` with the "app=MyApp" label. To access this
`service`
, a client can simply connect to $MYAPP_SERVICE_HOST on port
$MYAPP_SERVICE_PORT.
## Service without selector
Services, in addition to providing clean abstraction to access pods, can also
abstract any kind of backend:
-
you want to have an external database cluster in production, but in test you
use your own databases.
-
you want to point your service to a service in another
[
`namespace`
](
namespaces.md
)
or on another cluster.
-
you are migrating your workload to Kubernetes and some of your backends run
outside of Kubernetes.
In any of these scenarios you can define a service without a selector:
```
json
"kind"
:
"Service"
,
"apiVersion"
:
"v1beta1"
,
"id"
:
"myapp"
,
"port"
:
8765
```
then you can explicitly map the service to a specific endpoint(s):
```
json
"kind"
:
"Endpoints"
,
"apiVersion"
:
"v1beta1"
,
"id"
:
"myapp"
,
"endpoints"
:
[
"173.194.112.206:80"
]
```
Access to the service without a selector works the same as if it had selector. The
traffic will be routed to endpoints defined by the user (
`173.194.112.206:80`
in
case of this example).
## How do they work?
Each node in a Kubernetes cluster runs a
`service proxy`
. This application
...
...
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