mirror of https://github.com/pulumi/pulumi.git
41 lines
1.2 KiB
Python
41 lines
1.2 KiB
Python
import pulumi
|
|
import pulumi_kubernetes as kubernetes
|
|
|
|
bar = kubernetes.core.v1.Pod("bar",
|
|
api_version="v1",
|
|
metadata=kubernetes.meta.v1.ObjectMetaArgs(
|
|
namespace="foo",
|
|
name="bar",
|
|
),
|
|
spec=kubernetes.core.v1.PodSpecArgs(
|
|
containers=[
|
|
kubernetes.core.v1.ContainerArgs(
|
|
name="nginx",
|
|
image="nginx:1.14-alpine",
|
|
ports=[kubernetes.core.v1.ContainerPortArgs(
|
|
container_port=80,
|
|
)],
|
|
resources=kubernetes.core.v1.ResourceRequirementsArgs(
|
|
limits={
|
|
"memory": "20Mi",
|
|
"cpu": "0.2",
|
|
},
|
|
),
|
|
),
|
|
kubernetes.core.v1.ContainerArgs(
|
|
name="nginx2",
|
|
image="nginx:1.14-alpine",
|
|
ports=[kubernetes.core.v1.ContainerPortArgs(
|
|
container_port=80,
|
|
)],
|
|
resources=kubernetes.core.v1.ResourceRequirementsArgs(
|
|
limits={
|
|
"memory": "20Mi",
|
|
"cpu": "0.2",
|
|
},
|
|
),
|
|
),
|
|
],
|
|
))
|
|
kind = bar.kind
|