Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand azure guide to include Ingress config #77

Closed

Conversation

JamesMatchett
Copy link

Hi there!

Absolutely love this bit of kit, I've found it's amazing for teaching web-app security to developers, and the addition of kubernetes is a god-send for remote teaching with multiple people.

I've had a play with getting this to work in azure, hopefully this guide addition will be helpful to a few people, please correct me if I've made any mistakes or if there's a far easier way of getting ingress to work than what I've put together.

Many thanks, James M

#16

@J12934 J12934 added the documentation Improvements or additions to documentation label Feb 25, 2021
Copy link
Member

@J12934 J12934 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you 🙌

The helm chart also comes with some configurable ingress values (https://github.com/iteratec/multi-juicer/blob/master/helm/multi-juicer/values.yaml#L8) which would enable to set this without the additional ingress file. But I don't think these would work here as they assume that you have a hostname for it, unless you'd put the ingress controllers IP in it 🤔
We'd could try to adjust this guide to also use the helm values, that might slim it down a bit.

annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/rewrite-target: /static/$2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would also work with just the first ingress, right?
As the traffic for both still gets routed to the same service?

--set controller.admissionWebhooks.patch.nodeSelector."beta\.kubernetes\.io/os"=linux

```
Using the CLI, touch this file as `ingress.yml`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for consistency in this repo, best stick to using yaml as the file extension.

Suggested change
Using the CLI, touch this file as `ingress.yml`
Using the CLI, touch this file as `ingress.yaml`

Finally, apply this config to configure nginx-ingress to handle your traffic appropriately.

```bash
kubectl apply -f hello-world-ingress.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kubectl apply -f hello-world-ingress.yaml
kubectl apply -f ingress.yaml

@JamesMatchett
Copy link
Author

JamesMatchett commented Feb 25, 2021

Thanks for the comments @J12934 ! I'll be sure to make those changes tonight.

I may also add a very short section on provisioning for cost management, by default the Kubernetes VM Scale Set azure provisions is DS2_v2 which costs £73.99 p/m, so I'll add a short snippet on how to disable accelerated networking in order to scale down the instance to suit people's individual needs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants