k8s kubectl create命令使用详解

Create a resource by filename or stdin

摘要

Create a resource by filename or stdin.

JSON and YAML formats are accepted.

kubectl create -f FILENAME

示例

# Create a pod using the data in pod.json.
kubectl create -f ./pod.json# Create a pod based on the JSON passed into stdin.
cat pod.json | kubectl create -f -

选项

  -f, --filename=[]: Filename, directory, or URL to file to use to create the resource--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]-o, --output="": Output mode. Use "-o name" for shorter output (resource/name).--record[=false]: Record current kubectl command in the resource annotation.-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'--validate[=true]: If true, use a schema to validate the input before sending it

继承自父命令的选项

      --alsologtostderr[=false]: 同时输出日志到标准错误控制台和文件。--certificate-authority="": 用以进行认证授权的.cert文件路径。--client-certificate="": TLS使用的客户端证书路径。--client-key="": TLS使用的客户端密钥路径。--cluster="": 指定使用的kubeconfig配置文件中的集群名。--context="": 指定使用的kubeconfig配置文件中的环境名。--insecure-skip-tls-verify[=false]: 如果为true,将不会检查服务器凭证的有效性,这会导致你的HTTPS链接变得不安全。--kubeconfig="": 命令行请求使用的配置文件路径。--log-backtrace-at=:0: 当日志长度超过定义的行数时,忽略堆栈信息。--log-dir="": 如果不为空,将日志文件写入此目录。--log-flush-frequency=5s: 刷新日志的最大时间间隔。--logtostderr[=true]: 输出日志到标准错误控制台,不输出到文件。--match-server-version[=false]: 要求服务端和客户端版本匹配。--namespace="": 如果不为空,命令将使用此namespace。--password="": API Server进行简单认证使用的密码。-s, --server="": Kubernetes API Server的地址和端口号。--stderrthreshold=2: 高于此级别的日志将被输出到错误控制台。--token="": 认证到API Server使用的令牌。--user="": 指定使用的kubeconfig配置文件中的用户名。--username="": API Server进行简单认证使用的用户名。--v=0: 指定输出日志的级别。--vmodule=: 指定输出日志的模块,格式如下:pattern=N,使用逗号分隔。

参见

  • http://kubernetes.kansea.com/docs/user-guide/kubectl/kubectl_create/
  • kubectl - 使用kubectl来管理Kubernetes集群。
  • kubectl create configmap - Create a configMap from a local file, directory or literal value.
  • kubectl create namespace - Create a namespace with the specified name.
  • kubectl create secret - Create a secret using specified subcommand.
  • kubectl create serviceaccount - Create a service account with the specified name.

k8s kubectl create命令使用详解相关推荐

  1. k8s kubectl run命令使用详解

    k8s kubectl run命令使用详解 在集群上运行指定镜像. 摘要 创建并运行一个指定的可复制的镜像. 创建一个deployment或者job来管理创建的容器. kubectl run NAME ...

  2. k8s kubectl expose命令使用详解

    k8s kubectl expose命令使用详解 Take a replication controller, service, deployment or pod and expose it as ...

  3. kubectl常用命令大全详解

    文章目录 说明 基础命令详解:create.delete.get.run.expose.set.explain.edit create 命令:根据文件或者输入来创建资源 创建Deployment和Se ...

  4. 容器编排技术 -- Kubernetes kubectl create 命令详解

    容器编排技术 -- Kubernetes kubectl create 命令详解 1 kubectl create 2 语法 3 示例 4 Flags kubectl create 通过配置文件名或s ...

  5. php mysql source_Mysql数据库导入命令Source详解

    Mysql数据库导入命令Source详解 几个常用用例: 1.导出整个数据库 mysqldump -u 用户名 -p 数据库名 > 导出的文件名mysqldump -u root -p data ...

  6. Windows WMIC命令使用详解

    Windows WMIC命令使用详解 第一次执行WMIC命令时,Windows首先要安装WMIC,然后显示出WMIC的命令行提示符.在WMIC命令行提示符上,命令以交互的方式执行. 执行"w ...

  7. strace命令用法详解

    11-15 Web开发 Dante 7,290 strace命令用法详解 11-15 7,290 调用: strace [ -dffhiqrtttTvxx ] [ -acolumn ] [ -eexp ...

  8. python的pytest模块:pytest命令行详解

    一.官方文档 How to invoke pytest - pytest documentationhttps://docs.pytest.org/en/latest/how-to/usage.htm ...

  9. Docker常用命令使用详解(docker help、version、info、images)(一)

    Docker常用命令 命令 描述 docker .docker help.docker --help 列出可用命令 docker version 显示Docker版本信息 docker info 显示 ...

最新文章

  1. 好文深思:1.3 万亿条数据查询,如何做到毫秒级响应?
  2. Loj#2460-「POI2010」桥Bridges【网络流,欧拉回路】
  3. Sublime Text如何安装和卸载插件
  4. 制作安装媒体来部署额外域控制器
  5. 深度学习 目标检测 算法大全列表
  6. python画曲线图-python画曲线
  7. 2019年9月全国程序员工资统计(参考)
  8. 简单说说Java SE、Java EE、Java ME三者之间的区别
  9. Word 中自动设置匹配章、节序号的标题
  10. 【转】Power System 中基于 VIOS 的虚拟以太网实现
  11. SEO 优化--助力网站推广
  12. Verify the connector‘s configuration, identify and stop any process that‘s listening on port 80, or
  13. 微信登录异常errcode:40029
  14. 北京大学计算机及应用自考,2017年下半年北京大学计算机及应用专业自考毕业论文初审结果...
  15. 换钱问题(经典枚举样例)
  16. DC/DC转换器四大设计要点,这些技巧你掌握了吗?
  17. Linux删除history历史命令记录
  18. 最新版红雪越狱iOS 6(iPhone 4)教程
  19. zj-future03. 快递中转站选址
  20. 市值实现首度超越,Salesforce完胜甲骨文?

热门文章

  1. 【深度学习】基于区域生长的图像分割算法!
  2. 【深度学习】PyTorch 数据集随机值的完美实践
  3. 【NLP】发现一篇专门吐槽 NLP 内卷现状的 ACL 论文 ...
  4. 【数据竞赛】十大重要的时间组合特征!
  5. 【效率】推荐几个不错的网站!
  6. Ubuntu18.04+CUDA10.2 深度学习开发环境配置指南
  7. 10个关于文件操作的小功能(Python),都很实用~
  8. 深度学习笔记第一门课​第四周:深层神经网络
  9. 0109互联网新闻 | 微信推智言对话系统“小微”,接入第三方生态;华为发布首款数据中心交换机...
  10. awk 系列Part5:如何使用 awk 复合表达式