LoginSignup
0
0

More than 5 years have passed since last update.

(memo)KubernetesのREST APIのLabelSelectorパラメータの書き方

Posted at

k8sでdeploy後のPodの状態がS-in可能な状態になっているかをRest APIで確認する際に、LabelSelectorで対象を絞り込みたいんだけど、クエリパラメータの記述方法探しに10分以上時間食わされたのでメモ

LIST and WATCH operations may specify label selectors to filter the sets of objects returned using a query parameter. Both requirements are permitted:

* _equality-based_ requirements: `?labelSelector=environment%3Dproduction,tier%3Dfrontend`
* _set-based_ requirements: `?labelSelector=environment+in+%28production%2Cqa%29%2Ctier+in+%28frontend%29`
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0