k8s-ipam

command module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

README

Custom resource and controller files for IP address management with Kubernetes.

See https://github.com/Nexinto/k8s-ipam-configmap and https://github.com/Nexinto/k8s-ipam-haci

kubeipam utility

kubeipam is a command line utility to manage k8s-ipam address request objects.

You can create, inspect, list, delete address requests and manually assign IP addresses.

Usage:

kubeipam: manage k8s-ipam address request objects

Usage: kupeipam [options] VERB ...
       kubeipam get                                      list addresses
       kubeipam get NAME                                 get address
       kubeipam describe NAME                            get address details
       kubeipam set NAME IPADDRESS                       set reserved address
       kubeipam [-ref REF] [-d DESCRIPTION] create NAME  create a new address request
       kubeipam delete ADDRESS                           delete address request

  -d string
    	description
  -kubeconfig string
    	location of kubeconfig
  -n string
    	namespace; 'all' or empty for all namespaces
  -ref string
    	address reference

List addresses in the default namespace:

kubeipam get

List all addresses in all namespaces:

kubeipam -n all get

List addresses in the kube-system namespace:

kubeipam -n kube-system get

Show details for an address:

kubeipam describe myservice

Request a new address:

kubeipam -d "My great service needs an address" myservice

(The -d for description is optional.)

Request a new address that is a reference of an existing address:

kubeipam -ref kubernetes.default.myservice myotherservice

(The reference is the .Status.Name you get when describing the address.)

Manually set the address (if no controller is running to do this for you):

kubeipam set myservice 10.10.9.9

Delete an address request:

kubeipam delete myservice

Creating address requests with kubectl

To request an IP address, create myservice-ip.yaml:

apiVersion: ipam.nexinto.com/v1
kind: IpAddress
metadata:
  name: myservice
spec:
  comment: My great service will be at this address

and create it using kubectl apply -f myservice-ip.yaml.

Create a reference:

apiVersion: ipam.nexinto.com/v1
kind: IpAddress
metadata:
  name: myotherservice
spec:
  ref: kubernetes.default.myservice

The Spec supports the following fields:

  • description (optional) description for this address reservation
  • name (optional) name how the IP address management internally stores this address. The default is $TAG.$NAMESPACE.$NAME.
  • ref (optional) do not create a new address; instead reuse an existing entry. Use the IPAM name (like $TAG.$NAMESPACE.$NAME), not the Kubernetes object name.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
apis/ipam.nexinto.com/v1
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/ipam.nexinto.com/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/ipam.nexinto.com/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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