#配置kubectl子命令补全 [root@master01 work ]#yum install -y bash-completion [root@master01 work ]#source /usr/share/bash-completion/bash_completion [root@master01 work ]#source <(kubectl completion bash) [root@master01 work ]#kubectl completion bash > ~/.kube/completion.bash.inc [root@master01 work ]#source '/root/.kube/completion.bash.inc' [root@master01 work ]#source $HOME/.bash_profile 按两下tab键会将所有向查的东西列出来 [root@master01 work ]#kubectl get apiservices.apiregistration.k8s.io namespaces certificatesigningrequests.certificates.k8s.io networkpolicies.networking.k8s.io clusterrolebindings.rbac.authorization.k8s.io nodes clusterroles.rbac.authorization.k8s.io persistentvolumeclaims componentstatuses persistentvolumes configmaps poddisruptionbudgets.policy controllerrevisions.apps pods cronjobs.batch podsecuritypolicies.policy csidrivers.storage.k8s.io podtemplates csinodes.storage.k8s.io priorityclasses.scheduling.k8s.io customresourcedefinitions.apiextensions.k8s.io prioritylevelconfigurations.flowcontrol.apiserver.k8s.io daemonsets.apps replicasets.apps deployments.apps replicationcontrollers endpoints resourcequotas endpointslices.discovery.k8s.io rolebindings.rbac.authorization.k8s.io events roles.rbac.authorization.k8s.io events.events.k8s.io runtimeclasses.node.k8s.io flowschemas.flowcontrol.apiserver.k8s.io secrets horizontalpodautoscalers.autoscaling serviceaccounts ingressclasses.networking.k8s.io services ingresses.extensions statefulsets.apps ingresses.networking.k8s.io storageclasses.storage.k8s.io jobs.batch storageversions.internal.apiserver.k8s.io leases.coordination.k8s.io validatingwebhookconfigurations.admissionregistration.k8s.io limitranges volumeattachments.storage.k8s.io mutatingwebhookconfigurations.admissionregistration.k8s.io
标签:master01,补全,work,开启,io,k8s,root,bash From: https://www.cnblogs.com/rtnb/p/18598650