Git Product home page Git Product logo

Comments (3)

phongvu0403 avatar phongvu0403 commented on August 17, 2024

This issue is similar to #174 issue. But I can't make it work.

Maybe I had this load balancer problem too. I added external IP for loadbalancer by command:
kubectl patch svc nginx-ingress-controller -n kube-system -p '{"spec": {"type": "LoadBalancer", "externalIPs":["103.160.84.109"]}}'
with 103.160.84.109 is the public IP of my master node. But when I use: kubectl -n kube-system get service nginx-ingress-controller -o json, there is nothing in loadBalancer field of status field.

This is my output:

ubuntu@phongubuntu:~/landscape$ kubectl get svc -n kube-system
NAME                        TYPE           CLUSTER-IP       EXTERNAL-IP      PORT(S)                      AGE
kube-dns                    ClusterIP      10.96.0.10       <none>           53/UDP,53/TCP,9153/TCP       3d19h
metrics-server              ClusterIP      10.97.160.248    <none>           443/TCP                      2d23h
nginx-ingress-controller    LoadBalancer   10.106.17.50     103.160.84.109   80:32102/TCP,443:31741/TCP   2d19h
nginx-ingress-k8s-backend   ClusterIP      10.106.178.188   <none>           80/TCP                       2d19h
vpa-webhook                 ClusterIP      10.97.174.239    <none>           443/TCP                      2d23h
ubuntu@phongubuntu:~/landscape$ kubectl -n kube-system get service nginx-ingress-controller -o json
{
    "apiVersion": "v1",
    "kind": "Service",
    "metadata": {
        "annotations": {
            "dns.gardener.cloud/class": "garden-setup",
            "dns.gardener.cloud/dnsnames": "*.ing.rose.fptcloud.com",
            "dns.gardener.cloud/ttl": "120",
            "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"v1\",\"kind\":\"Service\",\"metadata\":{\"annotations\":{\"dns.gardener.cloud/class\":\"garden-setup\",\"dns.gardener.cloud/dnsnames\":\"*.ing.rose.fptcloud.com\",\"dns.gardener.cloud/ttl\":\"120\"},\"labels\":{\"app.kubernetes.io/component\":\"controller\",\"app.kubernetes.io/instance\":\"nginx-ingress\",\"app.kubernetes.io/managed-by\":\"Helm\",\"app.kubernetes.io/name\":\"ingress-nginx\",\"app.kubernetes.io/version\":\"0.43.0\",\"helm.sh/chart\":\"ingress-nginx-3.19.0\"},\"name\":\"nginx-ingress-controller\",\"namespace\":\"kube-system\"},\"spec\":{\"ports\":[{\"name\":\"http\",\"port\":80,\"protocol\":\"TCP\",\"targetPort\":\"http\"},{\"name\":\"https\",\"port\":443,\"protocol\":\"TCP\",\"targetPort\":\"https\"}],\"selector\":{\"app.kubernetes.io/component\":\"controller\",\"app.kubernetes.io/instance\":\"nginx-ingress\",\"app.kubernetes.io/name\":\"ingress-nginx\"},\"type\":\"LoadBalancer\"}}\n"
        },
        "creationTimestamp": "2021-07-16T08:17:36Z",
        "labels": {
            "app.kubernetes.io/component": "controller",
            "app.kubernetes.io/instance": "nginx-ingress",
            "app.kubernetes.io/managed-by": "Helm",
            "app.kubernetes.io/name": "ingress-nginx",
            "app.kubernetes.io/version": "0.43.0",
            "helm.sh/chart": "ingress-nginx-3.19.0"
        },
        "name": "nginx-ingress-controller",
        "namespace": "kube-system",
        "resourceVersion": "816753",
        "uid": "76c47786-852b-4f03-b256-e23471c063df"
    },
    "spec": {
        "clusterIP": "10.106.17.50",
        "clusterIPs": [
            "10.106.17.50"
        ],
        "externalIPs": [
            "103.160.84.109"
        ],
        "externalTrafficPolicy": "Cluster",
        "ipFamilies": [
            "IPv4"
        ],
        "ipFamilyPolicy": "SingleStack",
        "ports": [
            {
                "name": "http",
                "nodePort": 32102,
                "port": 80,
                "protocol": "TCP",
                "targetPort": "http"
            },
            {
                "name": "https",
                "nodePort": 31741,
                "port": 443,
                "protocol": "TCP",
                "targetPort": "https"
            }
        ],
        "selector": {
            "app.kubernetes.io/component": "controller",
            "app.kubernetes.io/instance": "nginx-ingress",
            "app.kubernetes.io/name": "ingress-nginx"
        },
        "sessionAffinity": "None",
        "type": "LoadBalancer"
    },
    "status": {
        "loadBalancer": {}
    }
}

Can someone tell me how to fix it? I used OpenStack. Thanks advance!

from garden-setup.

Diaphteiros avatar Diaphteiros commented on August 17, 2024

The nginx helm chart contains a service of type LoadBalancer. When it is created, kubernetes should create a loadbalancer on your infrastructure and - if that was successful - it will update the service with details about the loadbalancer (ip/hostname). Garden-setup needs this ip/hostname and therefore waits until the service has been updated, which never happens in your case.
Not every Openstack infrastructure does contain a managed Loadbalancer-as-a-Service - does your Openstack actually support this?

This is (most probably) unrelated to garden-setup. The problem is that kubernetes is unable to create a loadbalancer for the nginx service.

from garden-setup.

phongvu0403 avatar phongvu0403 commented on August 17, 2024

@Diaphteiros thank u for your reply.

from garden-setup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.