Closed TothFerenc closed 4 years ago
This PR introduces the showalloc command to show IP allocation map of DanmNets, ClusterNetworks and TenantNetworks.
showalloc
Parameters:
kubeconfig
dnet
cnet
tnet
n
default
6
showCIDR
a
Example run:
# showalloc --kubeconfig .kube/config -dnet sriov-a -n kube-system DANM network Kind: DanmNet IP version: IPv4 CIDR: 10.100.100.0/24 Pool start: 10.100.100.1 Pool end: 10.100.100.254 -------------------------------------------------------------- 10.100.100.0 : reserved (network base address) 10.100.100.1 : allocated (Pod: danmtest-869444956b-vxshh) 10.100.100.2 : allocated (Pod: danmtest-869444956b-gk2wh) 10.100.100.3 : allocated (Pod: danmtest-869444956b-rrfpr) 10.100.100.4 : allocated (Pod: danmtest-869444956b-z92pl) 10.100.100.5 : allocated (Pod: danmtest-869444956b-2j2vp) 10.100.100.255 : reserved (broadcast address)
This PR introduces the
showalloc
command to show IP allocation map of DanmNets, ClusterNetworks and TenantNetworks.Parameters:
kubeconfig
: to specify K8s apiserver credentialdnet
,cnet
,tnet
: to specify DANM networkn
: to specify namespace, by default it isdefault
6
: to switch to IPv6 mode, by default the IPv4 mode is activeshowCIDR
: to show the specified sub-CIDR onlya
: to show "free" and "out of pool range" IPs as well, by default these are suppressedExample run: