eg: >kubectl create configmap myconfigmap1 --from-file="C:\Users\ansheno\Desktop\password.txt" gives me the error error: "C:\Users\ansheno\Desktop\password.txt" is not a valid key name for a ConfigMap: a valid config key must consist of alphanumeric characters, '-', '_' or '.'...
$ kubectl rolling-update frontend-v1 -f frontend-v2.json # 滚动更新 pod frontend-v1 $ kubectl rolling-update frontend-v1 frontend-v2 --image=image:v2 # 更新资源名称并更新镜像 $ kubectl rolling-update frontend --image=image:v2 # 更新 frontend pod 中的镜像 $ kubectl rolling-update frontend...
deletekubectl delete [-f filename | type name | -l label] [flags]从配置文件,stdin,资源名称或label selector 删除资源对象 editkubectl edit [-f filename | type name | type/name] [flags]编辑资源对象的属性,在线更新 扩展命令 命令语法说明 ...
string。 自选。 当useConfigMapFile = false && command != login && command != logout时使用。 指定要在configMap中插入的键和文本值。 例如,--from-literal=key1=value1或--from-literal=key2="top secret"。 versionOrLocation-Kubectl string。 允许的值:version、location(指定位置)。 默认值:version。
kubectl create configmap cm2 --from-file=./host --from-file=./port 复制代码 1. 2. 通过一个文件内多个键值对,即(--from-env-file=file): vim env.txt 复制代码 1. 2. host=127.0.0.1 port=3306 复制代码 1. 2. 3. kubectl create configmap cm3 --from-env-file=env.txt ...
configmap Create a configmap from alocalfile, directory or literal value cronjob Create a cronjob with the specified name. deployment Create a deployment with the specified name. ingress Create an ingress with the specified name. job Create a job with the specified name. ...
kubectl create configmap my-config --from-literal=key1=config1 --from-literal=key2=config2 Create a new config map named my-config from the key=value pairs in the file kubectl create configmap my-config --from-file=path/to/bar Create a new config map named my-config from an env file...
3. Configmap: 是一种用于记录pod本身或其内部配置信息的API资源,可以认为是通过API形式存储的配置文件。 4. Endpoints: 用于记录每个service的pod的**真实物理**ip和port的对应关系,包括service是TCP还是UDP等。 5. Event: 用于记录集群中的事件,可以认为类似于日志里的一条记录。 6. LimitRange: 用于记录各个...
kubectl edit (-f FILENAME | TYPE NAME | TYPE/NAME) [flags] delete Delete resources by file names, stdin, resources and names, or by resources and label selector 基于文件、标准输入或通过指定标签选择器、名称、资源选择器或资源本身,删除资源。
cm:ConfigMap ns:NameSpace no:Node pvc:PersistentVolumeClaim pv:PersistentVolume po:Pod rc:ReplicationController sa:ServiceAccount svc:Service ds:DaemonSet deploy:Deployment rs:ReplicaSet sts:StatefulSet cj:CronJob 输出选项 kubectl [command] [TYPE] [NAME] -o= 常用-o yaml,一般...