helm install ingress-nginx

From wikieduonline
Jump to navigation Jump to search

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install my-ingress-nginx ingress-nginx/ingress-nginx


helm install my-release oci://ghcr.io/nginxinc/charts/nginx-ingress --version 0.18.0

Example[edit]

NAME: my-ingress-nginx
LAST DEPLOYED: Wed Nov  8 20:56:33 2023
NAMESPACE: default
STATUS: deployed
REVISION: 1
 TEST SUITE: None
 NOTES:
The ingress-nginx controller has been installed.
It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status by running 'kubectl --namespace default get services -o wide -w my-ingress-nginx-controller' 

An example Ingress that makes use of the controller:
  apiVersion: networking.k8s.io/v1
  kind: Ingress
  metadata:
    name: example
    namespace: foo
  spec:
    ingressClassName: nginx
    rules:
      - host: www.example.com
        http:
          paths:
            - pathType: Prefix
              backend:
                service:
                  name: exampleService
                  port:
                    number: 80
              path: /
    # This section is only required if TLS is to be enabled for the Ingress
    tls:
      - hosts:
        - www.example.com
        secretName: example-tls
If TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided:

  apiVersion: v1
  kind: Secret
  metadata:
    name: example-tls
    namespace: foo
  data:
    tls.crt: <base64 encoded cert>
    tls.key: <base64 encoded key>
  type: kubernetes.io/tls



k get configmaps -A
.../... 
default           my-ingress-nginx-controller                            1      33m


Errors[edit]

Error: INSTALLATION FAILED: failed pre-install: 1 error occurred:
       * timed out waiting for the condition

kubectl get events -A
NAMESPACE     LAST SEEN   TYPE      REASON                OBJECT                                        MESSAGE
default       5m43s       Normal    Scheduled             pod/my-ingress-nginx-admission-create-l9zzk   Successfully assigned default/my-ingress-nginx-admission-create-l9zzk to node3
default       5m43s       Normal    Pulling               pod/my-ingress-nginx-admission-create-l9zzk   Pulling image "registry.k8s.io/ingress-nginx/kube-webhook- certgen:v1.4.0@sha256:44d1d0e9f19c63f58b380c5fddaca7cf22c7cee564adeff365225a5df5ef3334" 
default       5m41s       Normal    Pulled                pod/my-ingress-nginx-admission-create-l9zzk   Successfully pulled image "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.4.0@sha256:44d1d0e9f19c63f58b380c5fddaca7cf22c7cee564adeff365225a5df5ef3334" in 1.8014151s (1.801441801s including waiting)
default       2m14s       Normal    Created               pod/my-ingress-nginx-admission-create-l9zzk   Created container create
default       2m13s       Normal    Started               pod/my-ingress-nginx-admission-create-l9zzk   Started container create
default       2m14s       Normal    Pulled                pod/my-ingress-nginx-admission-create-l9zzk   Container image "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.4.0@sha256:44d1d0e9f19c63f58b380c5fddaca7cf22c7cee564adeff365225a5df5ef3334" already present on machine
default       34s         Warning   BackOff               pod/my-ingress-nginx-admission-create-l9zzk   Back-off restarting failed container create in pod my-ingress-nginx-admission-create-l9zzk_default(f1d92a1c-85b6-479a-b72d-4d652fccbe23)
default       5m43s       Normal    SuccessfulCreate      job/my-ingress-nginx-admission-create         Created pod: my-ingress-nginx-admission-create-l9zzk

Related[edit]

See also[edit]

Advertising: