client-go icon indicating copy to clipboard operation
client-go copied to clipboard

how create deployment has multiple containers?

Open doing-cr7 opened this issue 3 years ago • 0 comments

i have a questions,i want to create multiple containers in a deployemnt template

` "spec": map[string]interface{}{ "containers": []map[string]interface{}{ { "name": p.ContainerName, "image": p.ContainerImage, "ports": []map[string]interface{}{ { "name": "http", "protocol": "TCP", "containerPort": p.ContainerPort, }, }, }, { "name": p.ContainerNameOne, "image": p.ContainerImageOne, "ports": []map[string]interface{}{ { "name": "http", "protocol": "TCP", "containerPort": p.ContainerPortOne, }, }, },

`

image

my code is panic : {"error": "the server does not allow this method on the requested resource"

so. how i create a deployement that has multiple containers

doing-cr7 avatar Aug 15 '22 03:08 doing-cr7