偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

Kubernetes命令行工具 (kubectl)

云計(jì)算 云原生
kubectl 是 Kubernetes 集群的命令行工具,通過(guò) kubectl 能夠?qū)罕旧磉M(jìn)行管理,并能 夠在集群上進(jìn)行容器化應(yīng)用的安裝部署。

1、概述

kubectl 是 Kubernetes 集群的命令行工具,通過(guò) kubectl 能夠?qū)罕旧磉M(jìn)行管理,并能 夠在集群上進(jìn)行容器化應(yīng)用的安裝部署。

2、語(yǔ)法

使用以下語(yǔ)法從終端窗口運(yùn)行 kubectl 命令:

kubectl [command] [TYPE] [NAME] [flags]

其中 command、TYPE、NAME 和 flags 分別是:

  • command:指定要對(duì)一個(gè)或多個(gè)資源執(zhí)行的操作,例如 create、get、describe、delete。
  • TYPE:指定資源類型。資源類型不區(qū)分大小寫, 可以指定單數(shù)、復(fù)數(shù)或縮寫形式。
  • NAME:指定資源的名稱。名稱區(qū)分大小寫。 如果省略名稱,則顯示所有資源的詳細(xì)信息。例如:kubectl get pods。
  • flags: 指定可選的參數(shù)。例如,可以使用 -s 或 --server 參數(shù)指定 Kubernetes API 服務(wù)器的地址和端口。

3、kubectl help 獲取更多信息

[root@k8s-master ~]# kubectl --help
kubectl controls the Kubernetes cluster manager.

 Find more information at: https://kubernetes.io/docs/reference/kubectl/

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 service
  run             在集群上運(yùn)行特定鏡像
  set             為對(duì)象設(shè)置指定特性

Basic Commands (Intermediate):
  explain         Get documentation for a resource
  get             顯示一個(gè)或多個(gè)資源
  edit            編輯服務(wù)器上的資源
  delete          Delete resources by file names, stdin, resources and names, or by resources and label selector

Deploy Commands:
  rollout         Manage the rollout of a resource
  scale           Set a new size for a deployment, replica set, or replication controller
  autoscale       Auto-scale a deployment, replica set, stateful set, or replication controller

Cluster Management Commands:
  certificate     修改證書資源。
  cluster-info    Display cluster information
  top             Display resource (CPU/memory) usage
  cordon          標(biāo)記節(jié)點(diǎn)為不可調(diào)度
  uncordon        標(biāo)記節(jié)點(diǎn)為可調(diào)度
  drain           清空節(jié)點(diǎn)以準(zhǔn)備維護(hù)
  taint           更新一個(gè)或者多個(gè)節(jié)點(diǎn)上的污點(diǎn)

Troubleshooting and Debugging Commands:
  describe        顯示特定資源或資源組的詳細(xì)信息
  logs            打印 Pod 中容器的日志
  attach          掛接到一個(gè)運(yùn)行中的容器
  exec            在某個(gè)容器中執(zhí)行一個(gè)命令
  port-forward    將一個(gè)或多個(gè)本地端口轉(zhuǎn)發(fā)到某個(gè) Pod
  proxy           運(yùn)行一個(gè)指向 Kubernetes API 服務(wù)器的代理
  cp              Copy files and directories to and from containers
  auth            Inspect authorization
  debug           Create debugging sessions for troubleshooting workloads and nodes

Advanced Commands:
  diff            Diff the live version against a would-be applied version
  apply           Apply a configuration to a resource by file name or stdin
  patch           Update fields of a resource
  replace         Replace a resource by file name or stdin
  wait            Experimental: Wait for a specific condition on one or many resources
  kustomize       Build a kustomization target from a directory or URL.

Settings Commands:
  label           更新某資源上的標(biāo)簽
  annotate        更新一個(gè)資源的注解
  completion      Output shell completion code for the specified shell (bash, zsh, fish, or powershell)

Other Commands:
  alpha           Commands for features in alpha
  api-resources   Print the supported API resources on the server
  api-versions    Print the supported API versions on the server, in the form of "group/version"
  config          修改 kubeconfig 文件
  plugin          Provides utilities for interacting with plugins
  version         輸出客戶端和服務(wù)端的版本信息

Usage:
  kubectl [flags] [options]

Use "kubectl <command> --help" for more information about a given command.
Use "kubectl options" for a list of global command-line options (applies to all commands).
[root@k8s-master ~]#

4、kubectl子命令使用分類

(1)基礎(chǔ)命令

(2)部署和集群管理命令

(3)故障和調(diào)試命令

(4)其他命令

責(zé)任編輯:姜華 來(lái)源: 今日頭條
相關(guān)推薦

2020-12-10 16:16:08

工具代碼開發(fā)

2020-12-11 06:44:16

命令行工具開發(fā)

2010-11-24 17:12:17

MySQL命令行

2013-12-09 14:29:13

OpenStack命令行工具API

2011-01-18 19:11:26

Postfix命令行

2023-11-02 10:24:30

KubectlKubernetes

2019-08-27 10:32:01

Linux操作系統(tǒng)Windows

2013-11-15 09:43:15

JDK工具

2018-05-04 09:15:35

PythonPlumbum命令行

2013-05-21 14:58:08

系統(tǒng)監(jiān)視glances開源

2014-08-25 16:23:24

2018-04-03 13:50:27

Linux容器命令行工具

2018-07-05 08:30:54

Python命令行工具shell

2021-01-27 11:53:08

工具Go 開發(fā)

2021-01-05 06:12:38

Tcpdump工具網(wǎng)絡(luò)

2017-06-15 10:32:56

OracleDBV命令行工具

2021-08-25 10:55:43

Linux命令工具

2014-02-12 13:30:16

Linux命令行終端工具

2010-02-04 15:17:48

Linux wget

2010-06-07 14:45:37

Linux下載工具
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)