"Create Kubernetes resource of kind KIND with definition DEFINITION."
(interactive
(list (kubed-read-resource-definition-file-name)))
- (message "Creating Kubernetes %s with definition `%s'..." (or kind "resource") definition)
- (message "Creating Kubernetes %s with definition `%s'... Done. New %s name is `%s'."
- (or kind "resource") definition (or kind "resource")
- (car (process-lines kubed-kubectl-executable
- "create" "-f" (expand-file-name definition)
- "-o" "jsonpath={.metadata.name}"))))
+ (let ((kind (or kind "resource")))
+ (message "Creating Kubernetes %s with definition `%s'..." kind definition)
+ (message "Creating Kubernetes %s with definition `%s'... Done. New %s name is `%s'."
+ kind definition kind
+ (car (process-lines kubed-kubectl-executable
+ "create" "-f" (expand-file-name definition)
+ "-o" "jsonpath={.metadata.name}")))))
(defun kubed-pod-containers (pod &optional k8sns)
"Return list of containers in Kubernetes pod POD in namespace K8SNS."