Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFE] Nested pods #25509

Open
dapiced opened this issue Mar 8, 2025 · 3 comments
Open

[RFE] Nested pods #25509

dapiced opened this issue Mar 8, 2025 · 3 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@dapiced
Copy link

dapiced commented Mar 8, 2025

Feature request description

Hi, is it possible to have a master pod that would contain several slave pods (with their containers) ? i don't have a specific case but i think it will be a good idea to finetune the nested pods concept...

Tell me if this is on you plan or maybe I'm wrong.... just let know your thought about these nested pods concept

thanks

Suggest potential solution

A clear and concise description of what you want to happen.

Have you considered any alternatives?

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

@dapiced dapiced added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 8, 2025
@baude baude changed the title Nested pods [RFE] Nested pods Mar 10, 2025
@baude
Copy link
Member

baude commented Mar 10, 2025

thanks for your request. could you elaborate on why this would be needed and helpful?

@dapiced
Copy link
Author

dapiced commented Mar 10, 2025

HI, here is what i mean.

Hierarchical Organization: Allows for a more organized structuring of containers, facilitating the management and understanding of relationships between services.
Increased Isolation: Each level of pods could offer an additional layer of isolation, enhancing security and stability.
Resource Management: A hierarchy of pods could enable finer resource allocation, controlling CPU and memory limits at different levels.
Modular Deployment: Facilitates the deployment of service subsets, allowing for updates or restarts of specific parts of the application without affecting the whole.
Scalability: Allows for independent scaling of service subsets, optimizing resource utilization.

Here are some concrete examples of nested pods

Example 1: Web Application with Support Services
Main Pod: Web Application
Pod 1: Web Server (Nginx)
Pod 1.1: Application Containers (Node.js)
Pod 1.2: Session Management Containers (Redis)
Pod 2: Database
Pod 2.1: Database Server (PostgreSQL)
Pod 2.1.1: Backup Containers (Backup Service)
Pod 2.1.2: Monitoring Containers (Prometheus)

Example 2: Microservices System
Main Pod: Microservices System
Pod 1: Authentication Service
Pod 1.1: API Containers (Spring Boot)
Pod 1.2: Token Management Containers (JWT Service)
Pod 2: Payment Service
Pod 2.1: Payment Processing Containers (Python)
Pod 2.2: Transaction Validation Containers (Go)

Example 3: Development Environment
Main Pod: Development Environment
Pod 1: Online IDE (Theia)
Pod 1.1: IDE Containers
Pod 1.2: Compilation Containers (GCC)
Pod 2: Development Services
Pod 2.1: Test Servers (JUnit)
Pod 2.2: Deployment Servers (Ansible)

These examples illustrate how a hierarchical structure of pods could be used to organize and manage containers more effectively.

@Luap99
Copy link
Member

Luap99 commented Mar 10, 2025

I don't think it would make sense, this seems quite complex as you now have pod dependencies and the cgroup management does not look straight forward either.

Also I am not aware of a nested pod design anywhere. At the very least this would be incompatible with k8s yaml.

I feel like all of this could be handled via external scripts already so I would be against this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants