Documentation
¶
Index ¶
- func ChangeImageDeployment(namespace, name, image string) (*v1.Deployment, error)
- func CreatePod(pod *apiv1.Pod) (*apiv1.Pod, error)
- func CreateService(info *models.Service) (*apiv1.Service, error)
- func DeleteDeployment(namespace, name string) error
- func DeleteJob(namespace, name string) error
- func DeletePod(namespace, name string) error
- func DeleteService(namespace, name string) error
- func GetClientSet() (*kubernetes.Clientset, error)
- func GetClientSetAndConfig() (*kubernetes.Clientset, *rest.Config)
- func GetDeploymentByName(namespace, name string) (*v1.Deployment, error)
- func GetDeploymentList() (*v1.DeploymentList, error)
- func GetDeploymentListByNamespace(namespace string) (*v1.DeploymentList, error)
- func GetJobByName(namespace, name string) (*apiv1.Job, error)
- func GetJobList(namespace string) (*apiv1.JobList, error)
- func GetJobListByLabels(namespace, label string) (*apiv1.JobList, error)
- func GetPodByName(namespace, name string) (*apiv1.Pod, error)
- func GetPodList() (*apiv1.PodList, error)
- func GetPodListByLabels(namespace, label string) (*apiv1.PodList, error)
- func GetPodListByNamespace(namespace string) (*apiv1.PodList, error)
- func GetPodLogByPodId(namespace, podid string) (string, error)
- func GetPodLogByPodIdAll(namespace, podid string) (string, error)
- func GetPodLogByPodIdByNum(namespace, podid string, num int64) (string, error)
- func GetServiceByName(namespace, name string) (*apiv1.Service, error)
- func GetServiceList() (*apiv1.ServiceList, error)
- func GetServiceListByNamespace(namespace string) (*apiv1.ServiceList, error)
- func InitClientSet()
- func PatchServicePort(info *models.Service) (*apiv1.Service, error)
- func ScaleDeployment(namespace, name string, num int32) (*v1.Deployment, error)
- type KubeConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeImageDeployment ¶
func ChangeImageDeployment(namespace, name, image string) (*v1.Deployment, error)
func DeleteDeployment ¶
func DeleteService ¶
func GetClientSetAndConfig ¶
func GetClientSetAndConfig() (*kubernetes.Clientset, *rest.Config)
func GetDeploymentByName ¶
func GetDeploymentByName(namespace, name string) (*v1.Deployment, error)
func GetDeploymentListByNamespace ¶
func GetDeploymentListByNamespace(namespace string) (*v1.DeploymentList, error)
func GetPodList ¶
func GetPodLogByPodId ¶
func GetPodLogByPodIdAll ¶
func GetPodLogByPodIdByNum ¶
func GetServiceList ¶
func GetServiceList() (*apiv1.ServiceList, error)
func GetServiceListByNamespace ¶
func GetServiceListByNamespace(namespace string) (*apiv1.ServiceList, error)
func ScaleDeployment ¶
func ScaleDeployment(namespace, name string, num int32) (*v1.Deployment, error)
Types ¶
type KubeConfig ¶
type KubeConfig struct {
Config string
}
func (*KubeConfig) GetClientSet ¶
func (this *KubeConfig) GetClientSet() (*kubernetes.Clientset, error)
k8s config实例初始化方法
func (*KubeConfig) GetClientSetInner ¶
func (this *KubeConfig) GetClientSetInner() (*kubernetes.Clientset, error)
k8s集群内部client
Click to show internal directories.
Click to hide internal directories.