Skip to content

Commit a1b47e8

Browse files
authored
Merge pull request #13574 from adellape/idling_4.0
Add idling topics to 4.0
2 parents 66c8524 + 336b723 commit a1b47e8

File tree

4 files changed

+99
-0
lines changed

4 files changed

+99
-0
lines changed

_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ Topics:
173173
File: quotas-setting-per-project
174174
- Name: Setting resource quotas across multiple projects
175175
File: quotas-setting-across-multiple-projects
176+
- Name: Idling applications
177+
File: idling-applications
176178
- Name: Extending the Kubernetes API with CRDs
177179
File: crd-extending-api-with-crds
178180
---

masters/idling-applications.adoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[id='idling_applications']
2+
= Idling applications
3+
include::modules/common-attributes.adoc[]
4+
:context: idling-applications
5+
6+
toc::[]
7+
8+
{nbsp} +
9+
Cluster administrators can idle applications to reduce resource consumption.
10+
This is useful when the cluster is deployed on a public cloud where cost is
11+
related to resource consumption.
12+
13+
If any scalable resources are not in use, {product-title} discovers and idles
14+
them by scaling their replicas to `0`. The next time network traffic is directed
15+
to the resources, the resources are unidled by scaling up the replicas, and
16+
normal operation continues.
17+
18+
Applications are made of services, as well as other scalable resources, such as
19+
deployment configurations. The action of idling an application involves idling
20+
all associated resources.
21+
22+
include::modules/idle-idling-applications.adoc[leveloffset=+1]
23+
include::modules/idle-unidling-applications.adoc[leveloffset=+1]

modules/idle-idling-applications.adoc

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * masters/idling-applications.adoc
4+
5+
[id='idle-idling-applications-{context}']
6+
= Idling applications
7+
8+
Idling an application involves finding the scalable resources (deployment
9+
configurations, replication controllers, and others) associated with a service.
10+
Idling an application finds the service and marks it as idled, scaling down the
11+
resources to zero replicas.
12+
13+
You can use the `oc idle` command to idle a single service, or use the
14+
`--resource-names-file` option to idle multiple services.
15+
16+
[id='idle-idling-applications-single-{context}']
17+
== Idling a single service
18+
19+
.Procedure
20+
21+
. To idle a single service, run:
22+
+
23+
----
24+
$ oc idle <service>
25+
----
26+
27+
[id='idle-idling-applications-multiple-{context}']
28+
== Idling multiple services
29+
30+
Idling multiple services is helpful if an application spans across a set of
31+
services within a project, or when idling multiple services in conjunction with
32+
a script in order to idle multiple applications in bulk within the same project.
33+
34+
.Procedure
35+
36+
. Create a file containing a list of the services, each on their own line.
37+
38+
. Idle the services using the `--resource-names-file` option:
39+
+
40+
----
41+
$ oc idle --resource-names-file <filename>
42+
----
43+
44+
[NOTE]
45+
====
46+
The `idle` command is limited to a single project. For idling applications across
47+
a cluster, run the `idle` command for each project individually.
48+
====
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * masters/idling-applications.adoc
4+
5+
[id='idle-unidling-applications-{context}']
6+
= Unidling applications
7+
8+
Application services become active again when they receive network traffic and
9+
are scaled back up their previous state. This includes both traffic to the
10+
services and traffic passing through routes.
11+
12+
Applications can also be manually unidled by scaling up the resources.
13+
14+
.Procedure
15+
16+
. To scale up a Deployment Configuration, run:
17+
+
18+
----
19+
$ oc scale --replicas=1 dc <dc_name>
20+
----
21+
22+
[NOTE]
23+
====
24+
Automatic unidling by a router is currently only supported by the default
25+
HAProxy router.
26+
====

0 commit comments

Comments
 (0)