LAB 10.1 Ingress not accessible on port 80
My environment:
Comments
-
Hello,
I am unsure of what your particular issue is here. You mention Ingress, which is a particular bit of software. From the output of the commands it looks like you are talking about a NodePort service called secondapp. You mention that you are not able to access the port 80.
To troubleshoot. first is the pod running? Can you go to the pod IP, port 80 and see the web server? Then check that the labels of the service match the labels of the pod. They are case sensitive.
In the future, it is helpful if you include the particular problem or error.
Regards,
0 -
Doesn't work as expected using the master node IP using port 80
Works with Cluster IP using port 30024:
and Works with EP IP
0 -
My apologies @serewicz. I had accidentally posted the question without getting the additional information.
All of this is after creating the secondapp deployment, exposing via node port as in 10.1 lab, creating the ingress.rbac.yaml, then creating the traefik-ds.yaml, then the ingress.rule.yaml provided. The pieces all seem to be there. Could it be that I don't have a public IP listed with I use kubectl get nodes on these local vms? Do I need to do something else to expose over the node's ip of 192.168.1.210 on the master node?
0 -
Hello,
It looks like the service is working, which means the pod is working. Next, is the ingress pod running? Do your ingress rules point to the proper service?
Regards,
0 -
I'm able to see these running
All three pods look fine in logs
Looks like the ingress-test is pointing to the endpoint created when exposing the secondapp deployment in the lab
Thank you for your help. I really appreciate it.
0 -
Are you using GCE or some other type for your lab? Is there a firewall which would prevent this traffic?
Regards,
0 -
I am running these on a local Ubuntu 18.04 server that is hosting the virtual nodes through KVM. All the commands are being ran on the k8s-master node.
0 -
Running ufw status shows that the firewall is inactive on the nodes.
0 -
Does it work when you access the KVM node from the host? This probably has to do with the nature of networking in KVM. If the traffic is coming from the VM it may not be routing such that you can see the traffic. When you write that the firewall is inactive on the nodes. I take this to mean the VMs running Kubernetes don't have a firewall. How about the host? Is it blocking the traffic? Perhaps a wireshark can tell you where the request is going when you use the k8smaster name instead of the internal IP.
This would appear to be a networking issue particular to how you deployed the lab.
0 -
Correct I meant the firewall is disabled on the VM nodes that make up the kubernetes cluster although it is the same on the physical server hosting the VMs. The networking is configured as such that the VMs are on my local network as well and not a NAT'd virtual network. Just to clarify how I can reach the NGINX page thus far.
From the Physical Server or any machine on my network I can curl to the k8s-master node (192.168.1.210) using the NodePort port 30728 created from exposing the deployment in the lab. I can also access this in the browser using machines on my network
This also work from on the k8s-master vmcurl -H "Host: example.com" http://192.168.1.210:30728
From the k8s-master VM I can also use the secondapp service clusterip to reach on port 80
curl -H "Host: example.com" http://10.101.141.180
or the Endpoint created by the service can be used to reach on port 80
curl -H "Host: www.example.com" http://192.168.107.198/
I just cannot access on port 80 on my VM's 192.168.1.210 ip which is the ip on my local network.
0 -
Hi @crumdev ,
I have seen similar issues reported in the forum. You may be experiencing them because your Pod subnet and Nodes subnet overlap. Calico by default uses 192.168.0.0/16 subnet for Pod networking. From your detailed outputs, it seems that your Node IPs fall within that same range. Within your iptables this may cause some confusion with traffic routing rules.
What I remember that worked in such situations, was to ensure that the IP ranges do not overlap for Pods and Nodes.
Regards,
-Chris0 -
Thank you @chrispokorni. I will try to reconfigure with a different non-overlapping subnet range. Since this is just a lab would there be any harm in using a smaller range like /24
0 -
A smaller range should work just fine. As long as the two ranges do not overlap, and the configuraion in
calico.yaml
is consistent with the property set in thekubeadm-config.yaml
file when you initialize the master node, you should be good to go.Regards,
-Chris0 -
I have similar problem during ex 7.2, except my nodes ip ranges do not overlap with calico ranges. I can see kubernetes api page on port 6443 but I cannot access secondapp server on prt 80. (I can see it at calico IP).
I have some DNS forwarding implemented on my end, but I don't think the artificial header has anything to do with.
What should I look for?
Thank you in advance!0 -
My yaml files looks correct, I have no firewall problem, but I noticed I have no ingress pod running:
kubectl describe --namespace=kube-system pod traefik-ingress-controller-ltgn9
Name: traefik-ingress-controller-ltgn9
Namespace: kube-system
Priority: 0
Node: kw1/10.1.10.31
Start Time: Wed, 29 Apr 2020 21:48:49 +0000
Labels: controller-revision-hash=5cd9d9799d
k8s-app=traefik-ingress-lb
name=traefik-ingress-lb
pod-template-generation=1
Annotations:
Status: Running
IP: 10.1.10.31
IPs:
IP: 10.1.10.31
Controlled By: DaemonSet/traefik-ingress-controller
Containers:
traefik-ingress-lb:
Container ID: docker://c4340c03cefd1d8a8d3f754cd747e7b555c78d698bfcbe813577a1dec6b5cb23
Image: traefik
Image ID: docker-pullable://traefik@sha256:ad4442a6f88cf35266542588f13ae9984aa058a55a518a87876e48c160d19ee0
Ports: 80/TCP, 8080/TCP
Host Ports: 80/TCP, 8080/TCP
Args:
--api
--kubernetes
--logLevel=INFO
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Thu, 30 Apr 2020 00:19:16 +0000
Finished: Thu, 30 Apr 2020 00:19:16 +0000
Ready: False
Restart Count: 34
Environment:
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from traefik-ingress-controller-token-rqwrs (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
traefik-ingress-controller-token-rqwrs:
Type: Secret (a volume populated by a Secret)
SecretName: traefik-ingress-controller-token-rqwrs
Optional: false
QoS Class: BestEffort
Node-Selectors:
Tolerations: node.kubernetes.io/disk-pressure:NoSchedule
node.kubernetes.io/memory-pressure:NoSchedule
node.kubernetes.io/network-unavailable:NoSchedule
node.kubernetes.io/not-ready:NoExecute
node.kubernetes.io/pid-pressure:NoSchedule
node.kubernetes.io/unreachable:NoExecute
node.kubernetes.io/unschedulable:NoSchedule
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Pulling 13m (x33 over 153m) kubelet, kw1 Pulling image "traefik"
Warning BackOff 3m36s (x698 over 153m) kubelet, kw1 Back-off restarting failed container0 -
Hi Stefan,
Please read carefully the exercise. It seems you may have missed some of the key details needed to spec the traefik image.
Regards,
-Chris0 -
Ok , now I change the container image value to traefik:v1.7 on traefik-ds.yaml and the pods started, I can access the server on my nodeIP port 80, and I get the nginx welcome page from curl using the required header.
Stefan
0 -
Hi Stefan,
I am glad that you were able to find all the needed configuration options in the lab exercise, and that the resources worked as expected once you followed the instructions as presented in the lab.
Regards,
-Chris0
Categories
- All Categories
- 217 LFX Mentorship
- 217 LFX Mentorship: Linux Kernel
- 788 Linux Foundation IT Professional Programs
- 352 Cloud Engineer IT Professional Program
- 177 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 146 Cloud Native Developer IT Professional Program
- 137 Express Training Courses
- 137 Express Courses - Discussion Forum
- 6.2K Training Courses
- 46 LFC110 Class Forum - Discontinued
- 70 LFC131 Class Forum
- 42 LFD102 Class Forum
- 226 LFD103 Class Forum
- 18 LFD110 Class Forum
- 37 LFD121 Class Forum
- 18 LFD133 Class Forum
- 7 LFD134 Class Forum
- 18 LFD137 Class Forum
- 71 LFD201 Class Forum
- 4 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 2 LFD233 Class Forum
- 4 LFD237 Class Forum
- 24 LFD254 Class Forum
- 694 LFD259 Class Forum
- 111 LFD272 Class Forum
- 4 LFD272-JP クラス フォーラム
- 12 LFD273 Class Forum
- 146 LFS101 Class Forum
- 1 LFS111 Class Forum
- 3 LFS112 Class Forum
- 2 LFS116 Class Forum
- 4 LFS118 Class Forum
- 6 LFS142 Class Forum
- 5 LFS144 Class Forum
- 4 LFS145 Class Forum
- 2 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 2 LFS157 Class Forum
- 25 LFS158 Class Forum
- 7 LFS162 Class Forum
- 2 LFS166 Class Forum
- 4 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 3 LFS178 Class Forum
- 3 LFS180 Class Forum
- 2 LFS182 Class Forum
- 5 LFS183 Class Forum
- 31 LFS200 Class Forum
- 737 LFS201 Class Forum - Discontinued
- 3 LFS201-JP クラス フォーラム
- 18 LFS203 Class Forum
- 130 LFS207 Class Forum
- 2 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 302 LFS211 Class Forum
- 56 LFS216 Class Forum
- 52 LFS241 Class Forum
- 48 LFS242 Class Forum
- 38 LFS243 Class Forum
- 15 LFS244 Class Forum
- 2 LFS245 Class Forum
- LFS246 Class Forum
- 48 LFS250 Class Forum
- 2 LFS250-JP クラス フォーラム
- 1 LFS251 Class Forum
- 151 LFS253 Class Forum
- 1 LFS254 Class Forum
- 1 LFS255 Class Forum
- 7 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.2K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 118 LFS260 Class Forum
- 159 LFS261 Class Forum
- 42 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 24 LFS267 Class Forum
- 22 LFS268 Class Forum
- 30 LFS269 Class Forum
- LFS270 Class Forum
- 202 LFS272 Class Forum
- 2 LFS272-JP クラス フォーラム
- 1 LFS274 Class Forum
- 4 LFS281 Class Forum
- 9 LFW111 Class Forum
- 259 LFW211 Class Forum
- 181 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 795 Hardware
- 199 Drivers
- 68 I/O Devices
- 37 Monitors
- 102 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 85 Storage
- 758 Linux Distributions
- 82 Debian
- 67 Fedora
- 17 Linux Mint
- 13 Mageia
- 23 openSUSE
- 148 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 353 Ubuntu
- 468 Linux System Administration
- 39 Cloud Computing
- 71 Command Line/Scripting
- Github systems admin projects
- 93 Linux Security
- 78 Network Management
- 102 System Management
- 47 Web Management
- 63 Mobile Computing
- 18 Android
- 33 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 371 Off Topic
- 114 Introductions
- 174 Small Talk
- 22 Study Material
- 805 Programming and Development
- 303 Kernel Development
- 484 Software Development
- 1.8K Software
- 261 Applications
- 183 Command Line
- 3 Compiling/Installing
- 987 Games
- 317 Installation
- 96 All In Program
- 96 All In Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)