LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.

Notices


Reply
  Search this Thread
Old 01-05-2021, 12:03 PM   #1
stampede
LQ Newbie
 
Registered: Dec 2018
Posts: 18

Rep: Reputation: Disabled
Container Networking Best Practice


Hi,
I just installed Minikube on a headless VM and have been running through some hello world type exercises.

I hit an issue I'm sure is quite common, and I was curious how most individuals and enterprises handle it.

So on this headless system, I ran https://minikube.sigs.k8s.io/docs/start/ hello-minikube. It is up successfully on
#: minikube service hello-minikube --url
http://192.168.39.55:30918
How can I view this page from an outside network? I could try forwarding to my normal 192.168.0.xxx, or what about bridging my 192.168.0.xxx and 192.168.39.xxx.

Before I try hacking it together, what is the SOP for this instance? Do enterprises have the pods deploy on reserved sections of their primary domain ex. 192.168.0.100-200? or do they just have everything bridged together at the switch level, exposing requested ports.
 
Old 01-07-2021, 08:57 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
minikube sets up a host-only network, which makes it impossible to access the minikube VM from outside the VirtualBox host without tricks. When searching for minikube external access, I stumbled on a description how to tweak VirtualBox so that external access becomes possible. Caveat: I have not tried this, and the description is three years old.

Instead of minikube, consider using kind (Kubernetes in Docker). It runs the Kubernetes services in Docker containers rather than a single virtual machine and is targeted to developers. Of course, you would have to set up Docker on your computer before using kind.
There might be other simple deployment tools for testing.

Regarding production installations, I would think that Kubernetes clusters are usually deployed in VMs on public clouds. The big players AWS, Azure and GCP all have convenient out-of-the-box K8s solutions, so that you don't have to worry much about complicated network setups. VMs running in the cloud are normally attached to some internal network but can be accessed from outside using SNAT (source network address translation).

Last edited by berndbausch; 01-07-2021 at 08:58 PM. Reason: formatting
 
1 members found this post helpful.
Old 01-09-2021, 06:16 AM   #3
stampede
LQ Newbie
 
Registered: Dec 2018
Posts: 18

Original Poster
Rep: Reputation: Disabled
Smile

Thanks so much for clarifying that berndbausch. I'm still early on my Kubernetes journey and trying to tie all the pieces together. I'll try out kind and a few other "distributions" (I guess you'd call them) of Kubernetes and see how they compare.

Thanks

I'll take a look at making the service externally visible, just for fun. I'm not using VirtualBox but maybe similar idea exists.
I'd imagine IPTables can be used to point service to another NIC?

Currently it's 192.168.39.55:30918, and I want to reach it via 192.168.0.XXX
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Meet Super Container OS, a Debian-Based Live Distro with a Built-In Container Engine LXer Syndicated Linux News 0 08-04-2020 11:24 AM
linux container host os and container os question jzoudavy Linux - Newbie 1 09-01-2015 05:21 AM
LXer: Inside the Open Container Project: How Docker plans to unite the container market LXer Syndicated Linux News 0 06-23-2015 04:30 AM
Best Practice Question zuessh Linux - Security 3 05-02-2003 11:46 AM
best practice for bldg & moving apps cparliament Linux - General 1 06-27-2002 04:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

All times are GMT -5. The time now is 03:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration