Kubernetes 之 ConfigMap

语法规范

create

#  kubectl create -f spark-configMap.yaml
The ConfigMap "spark-configMap" is invalid: metadata.name: Invalid value: "spark-configMap": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

metadata 里 的value值都调整成小写

describe

# kubectl describe configmaps  spark-configmap
Name:         spark-configmap
Namespace:    default
Labels:       
Annotations:  

Data
====
spark_driver_host:
----
sparkthrift-headless.default.svc.cluster.local
spark_driver_port:
----
1888
spark_executor_instances:
----
1
spark_kubernetes_container_image:
----
zhixingheyitian/spark:spark2.4.1
spark_kubernetes_driver_pod_name:
----
sparkthrift-pod
Events:  

get

# kubectl get configmaps  spark-configmap -o yaml
apiVersion: v1
data:
  spark_driver_host: sparkthrift-headless.default.svc.cluster.local
  spark_driver_port: "1888"
  spark_executor_instances: "1"
  spark_kubernetes_container_image: zhixingheyitian/spark:spark2.4.1
  spark_kubernetes_driver_pod_name: sparkthrift-pod
kind: ConfigMap
metadata:
  creationTimestamp: "2019-05-23T08:46:01Z"
  name: spark-configmap
  namespace: default
  resourceVersion: "2914613"
  selfLink: /api/v1/namespaces/default/configmaps/spark-configmap
  uid: 3191a005-7d37-11e9-ba83-001e67d8acca

你可能感兴趣的:(云计算,kubernetes)