PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, August 13, 2022

[FIXED] How to start an Ingress Controller with flags? (microk8s)

 August 13, 2022     argocd, kubernetes, kubernetes-ingress, microk8s, nginx-ingress     No comments   

Issue

Usually i am able to find most things by searching on the web - however in this case, the instructions on the web talk about - probably very basic stuff that i don't get yet.

What i am trying to achieve: i am trying to install argocd, using microk8s and nginx-ingress. Right now i am stuck at enabling the SSL passthrough for argocd. Currently i configured an ingress-controller according to the instructions of the argocd-documentation and the ingress-controller runs without errors.

My guess is that as it's mentioned everywhere that i have to start the ingress controller with the "--enable-ssl-passthrough"-flag.

https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#ssl-passthrough "SSL Passthrough is disabled by default and requires starting the controller with the --enable-ssl-passthrough flag."

Now my problem: How do i do that? - for me, the ingress controller is "just always running". I can delete and recreate the controller with the kubectl-command "create -f ingress.yaml" - which creates an ingress within the argocd-namespace.

i kind of lack the basics of kubernetes and don't get how i could stop and restart the ingress-controller with flags (perhaps i mistake what the "ingress controller" is too). Does anyone have an idea how i could achieve that?

I am running microk8s v1.23.1 on Ubuntu 18.04.3 LTS


Solution

If you can edit deployment YAML config to pass argument like

kubectl edit deployment <Nginx ingress controller deployment name> -n <namespace-name- in which Nginx is there> -o yaml

you can edit the YAML of the controller like

containers:
    - name: nginx-ingress-controller
      image: <IMAGE of Nginx>
      args:
        - --enable-ssl-passthrough

Ingress annotation if you want to add

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: minimal-ingress
  annotations:
    #LIST OF ANNOTATION YOU CAN ADD
    nginx.ingress.kubernetes.io/secure-backends: "true"
    nginx.ingress.kubernetes.io/ssl-passthrough: "true"
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  ingressClassName: nginx-example
  rules:
  - http:
      paths:
      - path: /testpath
        pathType: Prefix
        backend:
          service:
            name: test
            port:
              number: 80


Answered By - Harsh Manvar
Answer Checked By - Clifford M. (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing