Lab 4.3 Step 7
Built my lab in GCP (after wasting a lot of time on virtual box .... i'm stubborn that way!).
I cant seem to get step 7 to work. ie.e view sock shop app. I've tried adding a firewall rule to GCP but no joy.
Does anyone have any tips ?
Thanks
Comments
-
Hi, I have been using GCP as well and did not run into any issues. I agree that Vbox is quite challenging to setup and complete the labs on it.
Did you get a complete listing of the pods in step 6? Did you get any services listed at all on step 7?
The firewall rule I added in GCP was to enable all traffic.
Will try to run thru the lab again, to see if any behavior has changed...
Regards,
-Chris0 -
what is your all rule for ? any-any internally between the nodes which i believe may be required (never used GCP so starting at the basics) ? or all from the internet ? (in which case good luck!) An idiots guide to getting a cluster up an running on GCP is really needed as part of the course, id rather spend my time learning kube than networking !
0 -
sorry forgot to say - output from steps 6 &7 is as it should be ....
0 -
If both outputs are as expected, then you may just have a firewall issue.
The GCP firewall rules documentation is quite easy to follow:
https://cloud.google.com/vpc/docs/using-firewalls
It gives specific instructions on how to create firewall rules from the console and from the command line thru gcloud command.
Also, verify that the firewall on your VM instances is disabled.
I had to perform these steps on both GCP and AWS in order to get the nodes to communicate with each other and to be able to access the cluster from my laptop.0 -
Got it working thanks, would be good if these steps were included in the lab setup. I know its not too hard to figure out but will be slightly different depending on cloud platform or virtual box (routes?) etc. Will paste my notes below, a bit more detail may help others ....
1 -
If building on GCP you will need a couple of firewall rules when testing external conectivity.
The easiest was to do this is to tag all of your cluster nodes with the same tag. E.g. "k8s" Compute Engine > VM instances > VM Node > Network tags.
GCP has a "default-allow-internal" rule which is based on an IP range, this IP range does not match the calico pod network range, hence the cluster will not work as expected.
To fix this create a new rule "internal-all" as below:
internal-all
Network: default
Priority: 65534
Direction: Ingress
Action on match: Allow
Targets
Target tags: k8s
Source filters
Tags: k8s
Protocols and ports: all
Enforcement: EnabledThis will allow unrestricted pod to pod and pod to node traffic. You will also need a firewall rule to allow traffic from the external world.
E.g.letmein
Network: default
Priority: 65534
Direction: Ingress
Action on match: Allow
Targets
Target tags: k8s
Source filters
IP ranges: 0.0.0.0/0
Protocols and ports: tcp:30001 (Check what node port you want to allow)
Enforcement: EnabledThe second rule could be deleted / disabled when not needed for labs.
0 -
don't think i'm quite right on the IP range bit as its tunnelled but there is something in the default GCP rule thats k8s doesn't like. (disable the new rule and you have to hit the node running the pod but with rule in place you can hit any node as i'd expect.
Worth a watch :
https://www.youtube.com/watch?v=WwQ62OyCNz40 -
An informative video, thanks for sharing.
I looked back at my notes and I only found 1 fw rule I created for my Kubernetes related project. I did not create a VPC or any subnets, so I created the rule for the default network at the project level. The custom rule was very simple: Ingress, Apply to all targets, Range 0.0.0.0/0, All protocols, Allow, 1000. Since all instances in the project were Kubernetes nodes, I figured I'd create one rule to apply to all.
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)