Categorygithub.com/josudoey/kube
modulepackage
0.0.6
Repository: https://github.com/josudoey/kube.git
Documentation: pkg.go.dev

# README

kube-pod-watcher usage

$ go install github.com/josudoey/kube/cmd/[email protected]
$ kube-pod-watcher -h
$ kube-pod-watcher

kube-vhost usage

$ go install github.com/josudoey/kube/cmd/[email protected]
$ kube-vhost -h
$ kube-vhost show
$ kube-vhost server --port 8010

http client portforward example

package main

import (
	"net/http"

	"github.com/go-resty/resty/v2"
	"github.com/josudoey/kube/kubeutil"
	_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
)


func main() {
	kubePortForward, _ := kubeutil.HTTPPortForward(kubeutil.DefaultFactory())
	client := resty.NewWithClient(&http.Client{
		Transport: kubePortForward,
	})
	// ...
}

grpc client portforward example

package main

import (
	"github.com/josudoey/kube/kubeutil"
	"google.golang.org/grpc"
	"google.golang.org/grpc/credentials/insecure"
	_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
)


func main() {
	kubePortForward, _ := kubeutil.GRPCPortForward(kubeutil.DefaultFactory())
	addr := "<service name>:<port>"
	conn, err := grpc.Dial(addr,
		grpc.WithTransportCredentials(insecure.NewCredentials()),
		kubePortForward,
	)
	// ...
}

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

see https://github.com/kubernetes/kubectl/blob/652881798563c00c1895ded6ced819030bfaa4d7/pkg/polymorphichelpers/attachablepodforobject.go#L32.
GetPod.
No description provided by the author
GetFirstPod returns a pod matching the namespace and label selector and the number of all pods that match the label selector.
No description provided by the author
GetFirstPod returns a pod matching the namespace and label selector and the number of all pods that match the label selector.
GetService.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author

# Structs

No description provided by the author

# Type aliases

No description provided by the author