cronjobscustomresourcedefinition(缩写 crd)daemonsets(缩写 ds)deployments(缩写 deploy)endpoints(缩写 ep)events(缩写 ev)horizontalpodautoscalers(缩写 hpa)ingresses(缩写 ing)jobslimitranges(缩写 limits)namespaces(缩写 ns)networkpolicies(缩写 netpol)nodes(缩写 no)persistentvolumeclaims(缩写 pvc)persistentvolum...
# Run a CronJob manually kubectl create job [job-name] --image=image/name # Creates a new job from the job template specified in the cronjob kubectl create job -n [namespace] --from=cronjob/[cron-job-name] [job-name] Working with secrets 处理秘密 Secrets are used to store sensitive...
选项如下: Options:--allow-missing-template-keys=true: If true, ignore any errors in templates when a field or map key is missing inthe template. Only applies to golang and jsonpath output formats.--dry-run=false: If true, only print the object that would be sent, without sending it.--...
kubectl create cronjob test-job --image=busybox --schedule="*/1 * * * *" -- date $ job NAME --image=image [--from=cronjob/name] -- [COMMAND] [args...] kubectl create job my-job --image=busybox -- date $ deployment NAME --image=image [--dry-run] kubectl create deployment...
CronJob jobs TRUE Job certificatesigningrequests csr FALSE CertificateSigningRequest leases TRUE Lease endpointslices TRUE EndpointSlice events ev TRUE Event ingresses ing TRUE Ingress networkpolicies netpol TRUE NetworkPolicy runtimeclasses FALSE
kubectl run 创建并运行一个或多个容器镜像 kubectl set 配置资源对象设置特定功能 (2)Basic Commands(Intermediate)基础命令(中级) kubectl explain 查看资源对象的详细信息(一般用一编写yaml的时候做一个提示 kubectl explain deployment 会出现deployment下面可以写的字段以及字段属性还有 可以逐级使用) ...
kubectl run 命令能使用本地镜像吗 kubectl命令详解 Kubernetes kubectl命令详解与常用示例,基于k8s v1.17.4版本 kubectl常用示例 查看类命令 1 # 获取节点和服务版本信息 2 kubectl get nodes 3 # 获取节点和服务版本信息,并查看附加信息 4 kubectl get nodes -o wide...
jobTemplate: spec: template: spec: containers: - name: hello image: busybox imagePullPolicy: IfNotPresent command: # start shell and echo - /bin/sh - -c - date; echo Hello from the Kubernetes cluster restartPolicy: OnFailureGo to the scenario: LAB: K8s Cron JobAuthentication...
Usage: kubectl run NAME --image=image [--env="key=value"] [--port=port] [--replicas=replicas] [--dry-run=bool] [options]Man: 通过kubectl创建一个deployment或者Job。name为deployment的名字,image为容器的镜像 port为对容器外暴露的端口,replicas为副本数,dry-run为干运行(不创建pod) ...
cronjobs cj batchtrueCronJob jobs batchtrueJob certificatesigningrequests csr certificates.k8s.iofalseCertificateSigningRequest leases coordination.k8s.iotrueLease events ev events.k8s.iotrueEvent ingresses ing extensionstrueIngress nodes metrics.k8s.iofalseNodeMetrics ...