NodeSimulator

command module
v0.0.0-...-d0acd22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2021 License: MIT Imports: 13 Imported by: 0

README

NodeSimulator

NodeSimulator is a simulator, which can simulate the node resources and state in kubernetes and simulate the state of pod.

Preparations

  • kubernetes v1.18+

Deploy NodeSimulator

kubectl apply -f https://raw.githubusercontent.com/NJUPT-ISL/NodeSimulator/master/deploy/deploy.yaml

Simulate Node

  • Create 2 Nodes with 1 core, 4G memory & 2 GPUs in Cluster.
apiVersion: sim.k8s.io/v1
kind: NodeSimulator
metadata:
  name: fake-node
spec:
  number: 2
  capacity:
    cpu: "1"
    ephemeral-storage: 51539404Ki
    memory: 4Gi
    pods: "61"
    gpu:  "2"
  podCIDRs:
    - 172.16.0.64/26
  addresses:
    - address: 172.17.0.5
      type: InternalIP
  • Create a fake pod managed by nodesimulator
apiVersion: v1
kind: Pod
metadata:
  name: test-1
  labels:
    sim.k8s.io/managed: "true"
spec:
  containers:
    - image: nginx
      name: nginx

Contact us

QQ Group: 1048469440

img

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
api/v1
Package v1 contains API Schema definitions for the sim v1 API group +kubebuilder:object:generate=true +groupName=sim.k8s.io
Package v1 contains API Schema definitions for the sim v1 API group +kubebuilder:object:generate=true +groupName=sim.k8s.io

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL