Question: I've the following graph,

```
ed_ls = [(0, 1), (0, 63), (1, 2), (1, 3), (54, 0)]
ed_w = [1, 2, 3, 4, 5]
G = nx.Graph()
G.add_edges_from(ed_ls)
edge_w = OrderedDict(zip(G.edges, ed_w))
nx.set_edge_attributes(G, edge_w, 'weight')

print(G.edges)
print(nx.get_edge_attributes(G, 'weight'))

```

Output obtained:

```
{(0, 1): 1, (0, 63): 2, (0, 54): 3, (1, 2): 4, (1, 3): 5}

```

The edge weights in `ed_w` are in the same order of edges in `ed_ls`. Since the order of edges
is not preserved, wrong edge weights are assigned. I could use `nx.DiGraph` to avoid this problem. However, I want to use `nx.k_core` later on and this doesn't work on directed graphs. Suggestions on
how to go ahead will be highly appreciated.

Answer: 
Pods (even in the same namespace) are not able to talk **directly** to each other by default. You need to create a `Service` in order to allow a pod to receive connections from another pod. In general, one pod connects to another pod via the latter's service, as I illustrated below:

[![enter image description here](https://i.stack.imgur.com/mV4ax.png)](https://i.stack.imgur.com/mV4ax.png)

The connection info would look something like `<servicename>:<serviceport>` (e.g. `elasticsearch-master:9200`) rather than `localhost:port`.

You can read <https://kubernetes.io/docs/concepts/services-networking/service/> for further info on a service.

N.B: `localhost:port` will only work for containers running inside the same pod to connect to each other, just like how nginx connects to gravitee-mgmt-api and gravitee-mgmt-ui in my illustration above.
Well for me it looks like you didn't configure the sentry correctly means you are not providing credential to sentry pod to connect to PostgreSQL pod and redis pod.

```
env:
    - name: SENTRY_SECRET_KEY
      valueFrom:
        secretKeyRef:
          name: sentry-sentry
          key: sentry-secret
    - name: SENTRY_DB_USER
      value: "sentry"
    - name: SENTRY_DB_NAME
      value: "sentry"
    - name: SENTRY_DB_PASSWORD
      valueFrom:
        secretKeyRef:
          name: sentry-postgresql
          key: postgres-password
    - name: SENTRY_POSTGRES_HOST
      value: sentry-postgresql
    - name: SENTRY_POSTGRES_PORT
      value: "5432"
    - name: SENTRY_REDIS_PASSWORD
      valueFrom:
        secretKeyRef:
          name: sentry-redis
          key: redis-password
    - name: SENTRY_REDIS_HOST
      value: sentry-redis
    - name: SENTRY_REDIS_PORT
      value: "6379"
    - name: SENTRY_EMAIL_HOST
      value: "smtp"
    - name: SENTRY_EMAIL_PORT
      value: "25"
    - name: SENTRY_EMAIL_USER
      value: ""
    - name: SENTRY_EMAIL_PASSWORD
      valueFrom:
        secretKeyRef:
          name: sentry-sentry
          key: smtp-password
    - name: SENTRY_EMAIL_USE_TLS
      value: "false"
    - name: SENTRY_SERVER_EMAIL
      value: "sentry@sentry.local"

```

for more info you could refer to this where they configured the sentry

<https://github.com/maty21/sentry-kubernetes/blob/master/sentry.yaml>