I'm trying to get information on a service in Kube...
# kubernetes
I'm trying to get information on a service in Kubernetes using Python, to no avail:
Copy code
kubernetes.core.v1.Service.get("service", "kube-dns",
This results in
Preview failed: resource 'kube-dns' does not exist
Copy code
$ kubectl --kubeconfig /tmp/kubeconfig get svc -n kube-system kube-dns
NAME       TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)         AGE
kube-dns   ClusterIP   <none>        53/UDP,53/TCP   3d22h
And yes, my kubernetes_provider is using the
You need to specify the namespace in the
call. Should be
in this case
Thanks, that works! Unfortunately I get another error:
Copy code
error: Preview failed: 2 errors occurred:
        * Resource 'kube-dns' was created but failed to initialize
        * Service does not target any Pods. Selected Pods may not be ready, or field '.spec.selector' may not match labels on any Pods
It's the whole point of this exercise. I need to get the IP of the service so that I can redeploy and have the pods start. EKS is very silly in this Fargate exclusion limitation.
I would be extremely happy if I can just get some YAML out of Kubernetes
Hmm, I wouldn’t have expected it to run a readiness check on a
like that. I think that’s a bug.
Just to confirm, is that the same resource giving the error?
Just to clarify, this is a service that comes by default with EKS. I need to get some information from it - namely the cluster IP -, so I can apply a new template from AWS and fix the pods.
Are you planning on patching this resource with Pulumi? If so, an import would get you there quicker
Should I submit a bug report?
The fix is to get a YAML file from AWS, make some changes and then apply it, which I plan to do with Pulumi and kubernetes.yaml.
The problem with import is that I can't do it in one go, it requires manual intervention, which is not ideal when dealing with multiple accounts.
Yeah, could you file a bug report on the
failing a readiness check?
Really appreciate all the help. I've submitted the ticket: https://github.com/pulumi/pulumi-kubernetes/issues/1238
👍 1