Kubernetes 中 kubectl.sh 各种参数(待译)

Stella981
• 阅读 467

kubectl 是控制 Kubernetes 的集群管理器。

详情查看 https://github.com/kubernetes/kubernetes

用法:
  kubectl [flags]
  kubectl [command]

可用命令:
  get                            显示一个或多个资源
  describe                    显示指定资源或一组资源的详细信息
  create                        通过文件名 或 标准输入创建一个资源
  replace                      通过文件名或标准输入替换资源
  patch                        Update field(s) of a resource using strategic merge patch.
  delete                        Delete resources by filenames, stdin, resources and names, or by resources and label selector.
  edit                            编辑资源
  apply                         Apply a configuration to a resource by filename or stdin
  namespace                SUPERSEDED: Set and view the current Kubernetes namespace
  logs                            打印在 POD 容器中的日志
  rolling-update Perform a rolling update of the given ReplicationController.
  scale          Set a new size for a Replication Controller, Job, or Deployment.
  attach                         Attach 到容器中
  exec                            在容器中执行命令
  port-forward               装法一个或多个本地端口到 pod.
  proxy                           运行 Kubernetes API Server 代理
  run                               集群上运行特定镜像
  expose                        Take a replication controller, service or pod and expose it as a new Kubernetes Service
  autoscale                     自动衡量部署和冗余调节
  label                            更新 资源上的 labels 
  annotate                      更新资源上的 annotations
  config                           配置修改 kubeconfig 文件
  cluster-info                   显示集群信息
  api-versions   Print the supported API versions on the server, in the form of "group/version".
  version        Print the client and server version information.
  explain        Documentation of resources.
  convert        Convert config files between different API versions

Flags:
      --alsologtostderr[=false]: log to standard error as well as files
      --api-version="": The API version to use when talking to the server
      --certificate-authority="": Path to a cert. file for the certificate authority.
      --client-certificate="": Path to a client certificate file for TLS.
      --client-key="": Path to a client key file for TLS.
      --cluster="": The name of the kubeconfig cluster to use
      --context="": The name of the kubeconfig context to use
  -h, --help[=false]: help for kubectl
      --insecure-skip-tls-verify[=false]: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
      --kubeconfig="": Path to the kubeconfig file to use for CLI requests.
      --log-backtrace-at=:0: when logging hits line file:N, emit a stack trace
      --log-dir="": If non-empty, write log files in this directory
      --log-flush-frequency=5s: Maximum number of seconds between log flushes
      --logtostderr[=true]: log to standard error instead of files
      --match-server-version[=false]: Require server version to match client version
      --namespace="": If present, the namespace scope for this CLI request.
      --password="": Password for basic authentication to the API server.
  -s, --server="": The address and port of the Kubernetes API server
      --stderrthreshold=2: logs at or above this threshold go to stderr
      --token="": Bearer token for authentication to the API server.
      --user="": The name of the kubeconfig user to use
      --username="": Username for basic authentication to the API server.
      --v=0: log level for V logs
      --vmodule=: comma-separated list of pattern=N settings for file-filtered logging

点赞
收藏
评论区
推荐文章
blmius blmius
2年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
可莉 可莉
2年前
15.linux上安装kubectl和Minikube
1.安装kubectlkubectl是负责与k8s集群talk的工具,就像dockercli对话docker集群一样地址:https://kubernetes.io/docs/tasks/tools/installkubectl/Linux环境步骤:下载kubectl文件(因为涉及到翻墙的问
Stella981 Stella981
2年前
Rancher开源Harvester:基于K8s的超融合基础架构软件
2020年12月17日,业界应用最为广泛的Kubernetes管理平台创建者RancherLabs(以下简称Rancher)宣布推出全新开源软件Harvester,一个通过Kubernetes构建的超融合基础架构(HCI)软件。!图片(https://img.rwimg.top/7592_5649bc00e54d4b30a1419db9c4
Stella981 Stella981
2年前
Kubernetes和TensorFlow集群搭建
原创未名小宇宙2018012022:48:35@引用自今日头条莫问出处莫问归途本文演示在Kubernetes集群上搭建TensorFlow集群。集群如下:(请不要问node1哪去了,因为TA罢工了)!Kubernetes和TensorFlow集群搭建(https://oscimg.oschina.net/oscnet
Stella981 Stella981
2年前
KVM调整cpu和内存
一.修改kvm虚拟机的配置1、virsheditcentos7找到“memory”和“vcpu”标签,将<namecentos7</name<uuid2220a6d1a36a4fbb8523e078b3dfe795</uuid
Wesley13 Wesley13
2年前
Ubuntu 国内安装 kubernetes
由于墙的原因,国内要安装kubernetes非常的麻烦,因此只要解决这个问题,就可以顺利安装kubernetes的三个官法工具kubelet、kubeadm、kubectl。安装环境:OS:Ubuntu18.04.11.添加相应的源我在这里使用阿里源,命令如下:sudovim/
Stella981 Stella981
2年前
Kubernetes使用命令
kubeadm/kubelet/kubectl区别kubeadm是kubernetes集群快速构建工具kubelet运行在所有节点上,负责启动POD和容器,以系统服务形式出现kubectl:kubectl是kubenetes命令行工具,提供指令Kubernete
Wesley13 Wesley13
2年前
K8S知道,K9S呢?
k9s是用于管理Kubernetes集群的CLI。通过封装kubectl功能,k9s可以让开发者快速查看并解决运行Kubernetes时的日常问题。部分特性跟踪在Kubernetes集群运行的资源的实时活动处理Kubernetes标准资源和自定义资源跟踪与资源相关联的
Stella981 Stella981
2年前
K8s常用命令操作
一、kubernetes常用命令 一、kubectl命令补全  1、master安装命令补全,并临时生效yuminstallybashcompletionsource/usr/share/bashcompletion/bash_completion
Python进阶者 Python进阶者
2个月前
Excel中这日期老是出来00:00:00,怎么用Pandas把这个去除
大家好,我是皮皮。一、前言前几天在Python白银交流群【上海新年人】问了一个Pandas数据筛选的问题。问题如下:这日期老是出来00:00:00,怎么把这个去除。二、实现过程后来【论草莓如何成为冻干莓】给了一个思路和代码如下:pd.toexcel之前把这