Skip to content

gnmic/gnmik

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gnmik

gnmik is a kubectl plugin for working with gNMIc operator custom resources (Cluster, Pipeline, Target, etc.).

Install

Build and install so the binary name is kubectl-gnmic (kubectl discovers plugins as kubectl <plugin>):

go install github.com/gnmic/gnmik@latest

Ensure $(go env GOPATH)/bin is on your PATH.

Override the embedded version string at link time:

go install -ldflags "-X github.com/gnmic/gnmik/cmd.Version=1.2.3" github.com/gnmic/gnmik@latest

Usage

kubectl gnmic get clusters
kubectl gnmic describe cluster my-cluster
kubectl gnmic status pipeline my-pipeline
kubectl gnmic plan cluster my-cluster
kubectl gnmic graph
kubectl gnmic logs cluster my-cluster --follow
kubectl gnmic version
  • Namespace: use kubectl gnmic -n <namespace> ... or set the namespace in your current kubeconfig context. If unset, the plugin defaults to default (after checking the kubeconfig context namespace).

plan cluster

Calls the operator HTTP API through the Kubernetes API service proxy:

/api/v1/namespaces/<operator-ns>/services/<svc>:<port>/proxy/clusters/<cluster-ns>/<cluster-name>/plan

Flags (defaults match a typical operator install):

  • --operator-namespace (default: gnmic-system)
  • --service-name (default: gnmic-controller-manager-api)
  • --service-port (default: 8082)

You need RBAC to get the service and use connect/proxy to that endpoint.

Requirements

  • Kubernetes cluster with the gNMIc operator and CRDs installed
  • kubectl / kubeconfig access to the API server

Development

go test ./...
go vet ./...

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages