How to allow access to kubernetes api using egress network policy?

后端 未结 3 1498
花落未央
花落未央 2021-02-13 14:36

Init container with kubectl get pod command is used to get ready status of other pod.

After Egress NetworkPolicy was turned on init container can\'t access

3条回答
  •  一向
    一向 (楼主)
    2021-02-13 15:07

    We aren't on GCP, but the same should apply.

    We query AWS for the CIDR of our master nodes and use this data as values for helm charts creating the NetworkPolicy for the k8s API access.

    In our case the masters are part of an auto-scaling group, so we need the CIDR. In your case the IP might be enough.

提交回复
热议问题