flags := cmds.PersistentFlags()flags.SetNormalizeFunc(cliflag.WarnWordSepNormalizeFunc)// Warn for "_" flags// Normalize all flags that are coming from other packages or pre-configurations// a.k.a. change all "_" to "-". e.g. glog packageflags.SetNormalizeFunc(cliflag.WordSepNormalizeFunc)addProfilingFlags(flags)flags.BoolVar(&warningsAsErrors,"warnings-as-errors", warningsAsErrors,"Treat warnings received from the server as errors and exit with a non-zero exit code")
Basic Commands (Beginner):create Create a resource from a file or from stdin.expose Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Servicerun Run a particular image on the clusterset Set specific features on objects
Basic Commands (Intermediate):explain Documentation of resourcesget Display one or many resourcesedit Edit a resource on the serverdelete Delete resources by filenames, stdin, resources and names, or by resources and label selector
rollout Manage the rollout of a resourcescale Set a new size for a Deployment, ReplicaSet or Replication Controllerautoscale Auto-scale a Deployment, ReplicaSet, or ReplicationController
Cluster Management Commands:certificate Modify certificate resources.cluster-info Display cluster infotop Display Resource (CPU/Memory/Storage) usage.cordon Mark node as unschedulableuncordon Mark node as schedulabledrain Drain nodein preparation for maintenancetaint Update the taints on one or more nodes
Troubleshooting and Debugging Commands:describe Show details of a specific resource or group of resourceslogs Print the logs for a container in a podattach Attach to a running containerexec Execute a commandin a containerport-forward Forward one or morelocal ports to a podproxy Run a proxy to the Kubernetes API servercp Copy files and directories to and from containers.auth Inspect authorizationdebug Create debugging sessions for troubleshooting workloads and nodes
Advanced Commands:diff Diff live version against would-be applied versionapply Apply a configuration to a resource by filename or stdinpatch Update field(s) of a resourcereplace Replace a resource by filename or stdinwait Experimental: Wait for a specific condition on one or many resources.kustomize Build a kustomization target from a directory or a remote url.
Settings Commands:label Update the labels on a resourceannotate Update the annotations on a resourcecompletion Output shell completion code for the specified shell (bash or zsh)
深入理解 Windows Server 的核心功能:现代 IT 架构的基石
在现代 IT 基础架构中,Windows Server 一直扮演着不可或缺的角色。它不仅是一个强大的服务器操作系统,更是企业级解决方案的核心支柱。从中小型企业到跨国公司,Windows Server 提供了从身份管理到高可用性的一系列…