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

Add user guide for ingress nginx. #1159

Merged
merged 5 commits into from
Dec 12, 2019
Merged

Conversation

amwat
Copy link
Contributor

@amwat amwat commented Dec 11, 2019

Create a basic user guide that follows https://kubernetes.github.io/ingress-nginx/deploy/#prerequisite-generic-deployment-command and exposes hostPorts to make it work.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 11, 2019
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 11, 2019
@@ -0,0 +1,56 @@
# Ingress Nginx
Copy link
Member

Choose a reason for hiding this comment

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

we need some front matter metadata at the top

Copy link
Member

Choose a reason for hiding this comment

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

nit: Nginx -> NGINX, it's same case

@@ -0,0 +1,56 @@
# Ingress Nginx

Ingress Nginx in kind works by exposing ports `80(http)` and `443(https)`
Copy link
Member

Choose a reason for hiding this comment

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

maybe s/works/can be setup/ -- "works" implies this is the only solution or that we bundle a solution.


## Create A Cluster with Ingress Nginx

The following shell script will create a kind cluster deploy
Copy link
Member

Choose a reason for hiding this comment

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

, deploying ?

effect: NoSchedule
EOF
)"
```
Copy link
Member

Choose a reason for hiding this comment

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

can we add some basic usage?

we should at least link to the k8s.io ingress docs more

@BenTheElder
Copy link
Member

WDYT about titling the guide Ingress and then at least leaving room to expand it in the future to cover multiple options and general details of dealing with KIND & Ingress?

I'm sure the contour folks would love to pitch in, and we should probably dedupe the content.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 11, 2019
@amwat amwat force-pushed the nginx branch 2 times, most recently from daacdbb to 4dc870d Compare December 11, 2019 07:40
hostPort: 443
nodeSelector:
# schedule it on the control-plane node
node-role.kubernetes.io/master: ''
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe mention somewhere that this config only works if we have only one control-plane node, but is independent of the number of worker nodes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah yes. good point

Copy link
Member

Choose a reason for hiding this comment

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

maybe we should do the label thing then /shrug

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah added labels instead

@BenTheElder
Copy link
Member

netlify is gone again :(

@BenTheElder
Copy link
Member

and an Ingress object to route to these services.

```bash
cat <<EOF | kubectl apply -f -
Copy link
Member

Choose a reason for hiding this comment

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

this is somewhat unweildy for a cat EOF pipe thing, maybe we should split out the file contents and the apply (and perhaps host the actual contents as a file in static?)

Apply the contents

```bash
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/kind/master/site/content/docs/user/ingress-nginx-example.yaml
Copy link
Member

Choose a reason for hiding this comment

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

if we put this in static/ we can get a URL on the site

maybe static/manifests or something

then https://kind.sigs.k8s.io/manifests/ingress-nginx-example.yaml

later we can template in the site URL

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml

# Apply kind specific patches
kubectl patch deployments -n ingress-nginx nginx-ingress-controller -p "$(cat<<EOF
Copy link
Member

Choose a reason for hiding this comment

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

can kubectl patch take in a URL for the patch?

@amwat
Copy link
Contributor Author

amwat commented Dec 11, 2019

/retest

@BenTheElder
Copy link
Member

merging and iterating. still would like to see some changes
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 12, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amwat, BenTheElder

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 12, 2019
@k8s-ci-robot k8s-ci-robot merged commit 4a1129d into kubernetes-sigs:master Dec 12, 2019
@amwat amwat deleted the nginx branch December 12, 2019 02:29
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
authorization-mode: "AlwaysAllow"
Copy link
Member

Choose a reason for hiding this comment

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

Wait a sec, what's this about? 😅

Copy link
Member

Choose a reason for hiding this comment

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

i don't think this is needed for nginx ingress and it's not a recommended practice.

Copy link
Member

@aledbf aledbf May 3, 2020

Choose a reason for hiding this comment

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

I can confirm this is not required or recommended in ingress-nginx. Maybe it is required for something else?

Copy link
Member

Choose a reason for hiding this comment

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

i suspect this is not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, if it's working without it we can probably safely remove this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants