Skip to content

Comments

SmirnovIgor/1/#30

Open
SmirnovsIgor wants to merge 7 commits intozadeploy:masterfrom
SmirnovsIgor:hw1
Open

SmirnovIgor/1/#30
SmirnovsIgor wants to merge 7 commits intozadeploy:masterfrom
SmirnovsIgor:hw1

Conversation

@SmirnovsIgor
Copy link

@SmirnovsIgor SmirnovsIgor commented Jan 8, 2020

Implement _hw#1. This actually works but there are some differences between the instruction and my solution:

  • Instruction: Install Nginx as ingress controller. Nginx should be avialible on http://localhost:8080/

    My solution: Using Ingress, we cannot specify spec.rules.host field as "localhost", cause it is like the exception host. Generally speaking, as I understood, using localhost is for debug/development thus a simple port forwarding does the trick. But I didn't find the solution how to automate kubectl port-forward command. That's why I've named host as "localhst" and it worked on the url: http://localhst , but in instruction nginx should be available on 8080 port. I've read that Ingress does not support 8080 port, only defaults 80 and 443, thats why I cannot use 8080 port. Also I can use Nodeport but It is not compatible with Ingress. If I try to use NodePort and make changes in /etc/hosts, I'll face the another problem: service's default node port range is 30000-33000, therefore I need to change it, but I cannot find the solution how to automate doing that just terminating kubectl create -f <yml filename> command. That's why I can use port number in default range (30036). In this case it should work on http://localhst:30036/. I've chosen an Ingress option.

To check this home task you need to add to /etc/hosts file the string below:

<minikube ip>      localhst

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant