Comments (4)
Are we talking about service discovery itself, meaning obtaining endpoint addresses? (see environment variables
Environment variables defined in the ContainerSpec of the PodSpec are passed to the lxd container config as
config.environment.*
, which are passed to the init process of the container (seecat /proc/1/environ
) and usually the init system does not forward these. [...]
# xargs -0 -n 1 echo < /proc/1/environ
[...]
KUBERNETES_SERVICE_HOST=192.168.24.1
KUBERNETES_PORT_443_TCP_ADDR=192.168.24.1
KUBERNETES_PORT_443_TCP_PROTO=tcp
KUBERNETES_PORT_443_TCP=tcp://192.168.24.1:443
KUBERNETES_PORT=tcp://192.168.24.1:443
KUBERNETES_PORT_443_TCP_PORT=443
KUBERNETES_SERVICE_PORT=443
KUBERNETES_SERVICE_PORT_HTTPS=443
container=lxc
If we're talking about same node communication between pods, this should work out of the box thanks to the lxd networking (or CNI if you set --network-plugin=cni
). If not, we have to figure out how the interfaces are looking right now
If we're talking about inter node communication, we have to consider the kubernetes network plugin you are using.
from lxe.
Can we call service running inside lxc container through clusterip based dns and port of kubernetes service? and also expose it externally through nodeport?
from lxe.
Yes, pods created with lxe can be called through clusterip
The main part is network configuration here. Besides kubelet and lxe you need the networking tools of your chosen network plugin. I only have experience with flannel+kubeproxy, but I think the other kubernetes network plugins work similiar. Your used network plugin decides how your pod interface should look like and maybe they provide a CNI conf, so you can hook that up with lxe --network-plugin=cni
. Or, like flannel, your plugin chooses a network range for your node, you can set that in lxe with --bridge-dhcp-range
.
--bridge-dhcp-range string Which DHCP range to configure in the 'lxebr0' lxd bridge. Only applies if network-plugin is set to '' and does not exist yet. If empty, uses random range provided by lxd. Not needed, if kubernetes will publish the range using CRI UpdateRuntimeconfig
Yes, pods can be reached with Nodeport. LXE uses LXD's proxy device for that.
But: I have not played with all the network plugins! I only know flannel+kube-proxy and kube-router so far.
from lxe.
feel free to reopen if something is missing
from lxe.
Related Issues (16)
- make build error on Centos 7 HOT 1
- Questions regarding Cilium & LXE HOT 3
- gitter
- pods running in kube-system are down when using lxe HOT 7
- not able to ping from one lxc container to another lxc container in kubernetes cluster HOT 5
- remote lxc image repository(set up by myself) is not found during deployment in kubernetes cluster HOT 3
- Does LXE work with LXD3.15? HOT 10
- lxc pods are not completely cleaned up by kubectl delete deployment command HOT 1
- Accessing nfs share from lxc container inside k3s cluster HOT 2
- pod gets immediatly killed after beeing running HOT 10
- LXD has changed its licencing model to AGPLv3
- Failed to start container HOT 4
- Coexistence with docker CRI? HOT 10
- Flannel pod deployment failing. HOT 3
- Alternative approach HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lxe.