日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

k8s kubectl create命令使用详解

發布時間:2025/1/21 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 k8s kubectl create命令使用详解 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

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命令使用详解的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。