little-river-49422
02/08/2019, 6:36 AMlittle-river-49422
02/08/2019, 7:42 AM> pulumi up
Previewing update (aks):
Type Name Plan Info
pulumi:pulumi:Stack azure-py-kubernetes-aks 1 error
Diagnostics:
pulumi:pulumi:Stack (azure-py-kubernetes-aks):
error: Failed to locate 'python3' on your PATH. Have you installed Python 3.6 or greater?
error: an error occurred while advancing the preview
C:\_\pulumi-examples\azure-py-availability-set [master ≡ +2 ~0 -0 !]
> python
Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
little-river-49422
02/08/2019, 7:42 AMlittle-river-49422
02/08/2019, 9:41 AMimport asyncio
import pulumi
from pulumi import ResourceOptions
from pulumi_azure.core import ResourceGroup
from pulumi_kubernetes import Provider
from pulumi_azure.signalr import Service
from pulumi_azure.storage import Account
from other_namespace_repro import gen_service
from pulumi_kubernetes.core.v1 import ServiceAccount
from pulumi_kubernetes.rbac.v1 import RoleBinding
labels = {
"key": "value"
}
k8s = Provider("application_provider",
kubeconfig=%read-file-here%, namespace="something")
gen_namespace(k8s)
ServiceAccount(
"orleans-rbac",
metadata={
"name": "orleans-rbac"
}
)
gen_service('clarity-server', labels, [
8080, 11111, 30000], k8s)
other_namespace_repro.py
import pulumi
from pulumi import ResourceOptions
from pulumi_kubernetes.core.v1 import Service
def gen_service(name, labels, ports, custom_provider, service_type="ClusterIP"):
keys = ['name', 'port', 'target_port']
ports = [{**dict.fromkeys(keys[1:], port), "name": str(port)}
for port in ports]
service_definition = Service(name,
metadata={
"name": name,
"labels": labels,
"namespace": "default"
},
spec={
"ports": ports,
"selector": labels,
"type": service_type,
}, __opts__=ResourceOptions(provider=custom_provider))
return service_definition
incalculable-sundown-82514
02/08/2019, 6:04 PMpip install --pre pulumi_kubernetes
to pick it upincalculable-sundown-82514
02/08/2019, 6:05 PMpython3
, yes, we do explicitly look for python3.exe
because until 2020 python.exe
most often refers to Python 2 and was a major source of errors for peopleincalculable-sundown-82514
02/08/2019, 6:05 PMlittle-river-49422
02/08/2019, 6:33 PMlittle-river-49422
02/08/2019, 6:35 PMlittle-river-49422
02/08/2019, 6:38 PMlittle-river-49422
02/08/2019, 6:38 PMlittle-river-49422
02/08/2019, 6:42 PMlittle-river-49422
02/08/2019, 6:45 PMlittle-river-49422
02/08/2019, 6:47 PMlittle-river-49422
02/08/2019, 7:44 PMlittle-river-49422
02/08/2019, 7:45 PMlittle-river-49422
02/08/2019, 7:45 PMincalculable-sundown-82514
02/08/2019, 8:14 PMdefault
in your Service
- I don’t think that’s what you wantlittle-river-49422
02/08/2019, 8:16 PMincalculable-sundown-82514
02/08/2019, 8:16 PMincalculable-sundown-82514
02/08/2019, 8:16 PMlittle-river-49422
02/08/2019, 8:17 PMlittle-river-49422
02/08/2019, 8:17 PMincalculable-sundown-82514
02/08/2019, 8:20 PMincalculable-sundown-82514
02/08/2019, 8:20 PMincalculable-sundown-82514
02/08/2019, 8:21 PMpulumi_azure.signalr.Service
in the main fileincalculable-sundown-82514
02/08/2019, 8:21 PMpulumi_kubernetes_core.v1.Service
in the other fileincalculable-sundown-82514
02/08/2019, 8:21 PMincalculable-sundown-82514
02/08/2019, 8:22 PMlittle-river-49422
02/08/2019, 8:29 PM