@@ -661,110 +661,6 @@ poorly-behaved workloads that may be harming system health.
661
661
to a request being dispatched but did not, due to lack of available
662
662
concurrency, broken down by ` flow_schema ` and ` priority_level ` .
663
663
664
- ### Debug endpoints
665
-
666
- When you enable the API Priority and Fairness feature, the ` kube-apiserver `
667
- serves the following additional paths at its HTTP(S) ports.
668
-
669
- - ` /debug/api_priority_and_fairness/dump_priority_levels ` - a listing of
670
- all the priority levels and the current state of each. You can fetch like this:
671
-
672
- ``` shell
673
- kubectl get --raw /debug/api_priority_and_fairness/dump_priority_levels
674
- ```
675
-
676
- The output is similar to this:
677
-
678
- ``` none
679
- PriorityLevelName, ActiveQueues, IsIdle, IsQuiescing, WaitingRequests, ExecutingRequests, DispatchedRequests, RejectedRequests, TimedoutRequests, CancelledRequests
680
- catch-all, 0, true, false, 0, 0, 1, 0, 0, 0
681
- exempt, <none>, <none>, <none>, <none>, <none>, <none>, <none>, <none>, <none>
682
- global-default, 0, true, false, 0, 0, 46, 0, 0, 0
683
- leader-election, 0, true, false, 0, 0, 4, 0, 0, 0
684
- node-high, 0, true, false, 0, 0, 34, 0, 0, 0
685
- system, 0, true, false, 0, 0, 48, 0, 0, 0
686
- workload-high, 0, true, false, 0, 0, 500, 0, 0, 0
687
- workload-low, 0, true, false, 0, 0, 0, 0, 0, 0
688
- ```
689
-
690
- - ` /debug/api_priority_and_fairness/dump_queues ` - a listing of all the
691
- queues and their current state. You can fetch like this:
692
-
693
- ``` shell
694
- kubectl get --raw /debug/api_priority_and_fairness/dump_queues
695
- ```
696
-
697
- The output is similar to this:
698
-
699
- ``` none
700
- PriorityLevelName, Index, PendingRequests, ExecutingRequests, VirtualStart,
701
- workload-high, 0, 0, 0, 0.0000,
702
- workload-high, 1, 0, 0, 0.0000,
703
- workload-high, 2, 0, 0, 0.0000,
704
- ...
705
- leader-election, 14, 0, 0, 0.0000,
706
- leader-election, 15, 0, 0, 0.0000,
707
- ```
708
-
709
- - ` /debug/api_priority_and_fairness/dump_requests ` - a listing of all the requests
710
- that are currently waiting in a queue. You can fetch like this:
711
-
712
- ``` shell
713
- kubectl get --raw /debug/api_priority_and_fairness/dump_requests
714
- ```
715
-
716
- The output is similar to this:
717
-
718
- ``` none
719
- PriorityLevelName, FlowSchemaName, QueueIndex, RequestIndexInQueue, FlowDistingsher, ArriveTime,
720
- exempt, <none>, <none>, <none>, <none>, <none>,
721
- system, system-nodes, 12, 0, system:node:127.0.0.1, 2020-07-23T15:26:57.179170694Z,
722
- ```
723
-
724
- In addition to the queued requests, the output includes one phantom line
725
- for each priority level that is exempt from limitation.
726
-
727
- You can get a more detailed listing with a command like this:
728
-
729
- ``` shell
730
- kubectl get --raw ' /debug/api_priority_and_fairness/dump_requests?includeRequestDetails=1'
731
- ```
732
-
733
- The output is similar to this:
734
-
735
- ``` none
736
- PriorityLevelName, FlowSchemaName, QueueIndex, RequestIndexInQueue, FlowDistingsher, ArriveTime, UserName, Verb, APIPath, Namespace, Name, APIVersion, Resource, SubResource,
737
- system, system-nodes, 12, 0, system:node:127.0.0.1, 2020-07-23T15:31:03.583823404Z, system:node:127.0.0.1, create, /api/v1/namespaces/scaletest/configmaps,
738
- system, system-nodes, 12, 1, system:node:127.0.0.1, 2020-07-23T15:31:03.594555947Z, system:node:127.0.0.1, create, /api/v1/namespaces/scaletest/configmaps,
739
- ```
740
-
741
- ### Debug logging
742
-
743
- At ` -v=3 ` or more verbose the server outputs an httplog line for every
744
- request, and it includes the following attributes.
745
-
746
- - ` apf_fs ` : the name of the flow schema to which the request was classified.
747
- - ` apf_pl ` : the name of the priority level for that flow schema.
748
- - ` apf_iseats ` : the number of seats determined for the initial
749
- (normal) stage of execution of the request.
750
- - ` apf_fseats ` : the number of seats determined for the final stage of
751
- execution (accounting for the associated WATCH notifications) of the
752
- request.
753
- - ` apf_additionalLatency ` : the duration of the final stage of
754
- execution of the request.
755
-
756
- At higher levels of verbosity there will be log lines exposing details
757
- of how APF handled the request, primarily for debugging purposes.
758
-
759
- ### Response headers
760
-
761
- APF adds the following two headers to each HTTP response message.
762
-
763
- - ` X-Kubernetes-PF-FlowSchema-UID ` holds the UID of the FlowSchema
764
- object to which the corresponding request was classified.
765
- - ` X-Kubernetes-PF-PriorityLevel-UID ` holds the UID of the
766
- PriorityLevelConfiguration object associated with that FlowSchema.
767
-
768
664
## Good practices for using API Priority and Fairness
769
665
770
666
When a given priority level exceeds its permitted concurrency, requests can
@@ -881,7 +777,7 @@ Example FlowSchema object to isolate list event requests:
881
777
882
778
## {{% heading "whatsnext" %}}
883
779
884
- You can visit flow control [ troubleshooting page ] ( /docs/tasks/debug/ flow-control.md ) to learn how to debug .
780
+ You can visit flow control [ reference doc ] ( /docs/reference/ flow-control/ ) to learn more about troubleshooting .
885
781
For background information on design details for API priority and fairness, see
886
782
the [ enhancement proposal] ( https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1040-priority-and-fairness ) .
887
783
You can make suggestions and feature requests via [ SIG API Machinery] ( https://github.com/kubernetes/community/tree/master/sig-api-machinery )
0 commit comments