frontend, backend and database that use the image nginx.frontend: env=prod, team=shinybackend: env=prod, team=legacy, app=v1.2.4database: env=prod, team=storagefrontend: contact=John Doe, commit=2d3mg3backend: contact=Mary Harrisshiny and legacy.env from the backend Pod and rerun the selection.You can assign labels upon Pod creation with the --labels option.
$ kubectl run frontend --image=nginx --restart=Never --labels=env=prod,team=shiny pod/frontend created $ kubectl run backend --image=nginx --restart=Never --labels=env=prod,team=legacy,app=v1.2.4 pod/backend created $ kubectl run database --image=nginx --restart=Never --labels=env=prod,team=storage pod/database created
原文:https://www.cnblogs.com/peteremperor/p/12831704.html