k8s 命令备忘¶
kubectl 命令涵盖了对 k8s
集群的主要操作,包括资源对象的创建、删除、查看、修改、配置、运行等
命令格式如下: kubectl [command] [TYPE] [NAME] [flags]
例子: - kubectl version 查看 version - kubectl get cs 查看组件状态
NAME |
SHOR TNAM ES |
APIG ROUP |
NAME SPAC ED |
KIND |
---|---|---|---|---|
bind ings |
true |
Bind ing |
||
comp onen tsta tuse s |
cs |
fals e |
Comp onen tSta tus |
|
conf igma ps |
cm |
true |
Conf igMa p |
|
endp oint s |
ep |
true |
Endp oint s |
|
even ts |
ev |
true |
Even t |
|
limi tran ges |
limi ts |
true |
Limi tRan ge |
|
name spac es |
ns |
fals e |
Name spac e |
|
node s |
no |
fals e |
Node |
|
pers iste ntvo lume clai ms |
pvc |
true |
Pers iste ntVo lume Clai m |
|
pers iste ntvo lume s |
pv |
fals e |
Pers iste ntVo lume |
|
pods |
po |
true |
Pod |
|
podt empl ates |
true |
PodT empl ate |
||
repl icat ionc ontr olle rs |
rc |
true |
Repl icat ionC ontr olle r |
|
reso urce quot as |
quot a |
true |
Reso urce Quot a |
|
secr ets |
true |
Secr et |
||
serv icea ccou nts |
sa |
true |
Serv iceA ccou nt |
|
serv ices |
svc |
true |
Serv ice |
|
muta ting webh ookc onfi gura tion s |
admi ssio nreg istr atio n.k8 s.io |
fals e |
Muta ting Webh ookC onfi gura tion |
|
vali dati ngwe bhoo kcon figu rati ons |
admi ssio nreg istr atio n.k8 s.io |
fals e |
Vali dati ngWe bhoo kCon figu rati on |
|
cust omre sour cede fini tion s |
crd, crds |
apie xten sion s.k8 s.io |
fals e |
Cust omRe sour ceDe fini tion |
apis ervi ces |
apir egis trat ion. k8s. io |
fals e |
APIS ervi ce |
|
cont roll erre visi ons |
apps |
true |
Cont roll erRe visi on |
|
daem onse ts |
ds |
apps |
true |
Daem onSe t |
depl oyme nts |
depl oy |
apps |
true |
Depl oyme nt |
repl icas ets |
rs |
apps |
true |
Repl icaS et |
stat eful sets |
sts |
apps |
true |
Stat eful Set |
toke nrev iews |
auth enti cati on.k 8s.i o |
fals e |
Toke nRev iew |
|
loca lsub ject acce ssre view s |
auth oriz atio n.k8 s.io |
true |
Loca lSub ject Acce ssRe view |
|
self subj ecta cces srev iews |
auth oriz atio n.k8 s.io |
fals e |
Self Subj ectA cces sRev iew |
|
self subj ectr ules revi ews |
auth oriz atio n.k8 s.io |
fals e |
Self Subj ectR ules Revi ew |
|
subj ecta cces srev iews |
auth oriz atio n.k8 s.io |
fals e |
Subj ectA cces sRev iew |
|
hori zont alpo daut osca lers |
hpa |
auto scal ing |
true |
Hori zont alPo dAut osca ler |
cron jobs |
cj |
batc h |
true |
Cron Job |
jobs |
batc h |
true |
Job |
|
cert ific ates igni ngre ques ts |
csr |
cert ific ates .k8s .io |
fals e |
Cert ific ateS igni ngRe ques t |
leas es |
coor dina tion .k8s .io |
true |
Leas e |
|
even ts |
ev |
even ts.k 8s.i o |
true |
Even t |
daem onse ts |
ds |
exte nsio ns |
true |
Daem onSe t |
depl oyme nts |
depl oy |
exte nsio ns |
true |
Depl oyme nt |
ingr esse s |
ing |
exte nsio ns |
true |
Ingr ess |
netw orkp olic ies |
netp ol |
exte nsio ns |
true |
Netw orkP olic y |
pods ecur ityp olic ies |
psp |
exte nsio ns |
fals e |
PodS ecur ityP olic y |
repl icas ets |
rs |
exte nsio ns |
true |
Repl icaS et |
netw orkp olic ies |
netp ol |
netw orki ng.k 8s.i o |
true |
Netw orkP olic y |
podd isru ptio nbud gets |
pdb |
poli cy |
true |
PodD isru ptio nBud get |
pods ecur ityp olic ies |
psp |
poli cy |
fals e |
PodS ecur ityP olic y |
clus terr oleb indi ngs |
rbac .aut hori zati on.k 8s.i o |
fals e |
Clus terR oleB indi ng |
|
clus terr oles |
rbac .aut hori zati on.k 8s.i o |
fals e |
Clus terR ole |
|
role bind ings |
rbac .aut hori zati on.k 8s.i o |
true |
Role Bind ing |
|
role s |
rbac .aut hori zati on.k 8s.i o |
true |
Role |
|
prio rity clas ses |
pc |
sche duli ng.k 8s.i o |
fals e |
Prio rity Clas s |
stor agec lass es |
sc |
stor age. k8s. io |
fals e |
Stor ageC lass |
volu meat tach ment s |
stor age. k8s. io |
fals e |
Volu meAt tach ment |