Skip to content

a draft for k8s branch - #158

Merged
bcicen merged 3 commits into
bcicen:k8sfrom
sah4ez:bcicen-k8s
Dec 2, 2018
Merged

a draft for k8s branch#158
bcicen merged 3 commits into
bcicen:k8sfrom
sah4ez:bcicen-k8s

Conversation

@sah4ez

@sah4ez sah4ez commented Dec 1, 2018

Copy link
Copy Markdown
Contributor

Draft k8s integration through hipster.
Need test on other versions of k8s. I tested only on 1.8 :-(

@sah4ez sah4ez mentioned this pull request Dec 1, 2018
@sah4ez sah4ez changed the title Draft k8s a draft for k8s branch Dec 1, 2018
@sah4ez

sah4ez commented Dec 1, 2018

Copy link
Copy Markdown
Contributor Author

@bcicen may be better write task list for updates/testing ctop with k8s? It would cool for implementing new features have it.

@bcicen
bcicen merged commit 0674b66 into bcicen:k8s Dec 2, 2018
@bcicen

bcicen commented Dec 2, 2018

Copy link
Copy Markdown
Owner

@sah4ez yes, absolutely -- right now I am looking into issues when specifying all namespaces -n ""

@one1zero1one

Copy link
Copy Markdown

Hi @sah4ez I tried to build and run, but i get

./ctop -connector kubernetes -n kube-system
error: runtime error: invalid memory address or nil pointer dereference
 kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"clean", BuildDate:"2018-11-26T14:38:32Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.7-gke.8", GitCommit:"7d3d6f113e933ed1b44b78dff4baf649258415e5", GitTreeState:"clean", BuildDate:"2019-06-19T16:37:16Z", GoVersion:"go1.11.5b4", Compiler:"gc", Platform:"linux/amd64"}

any ideea?

@sah4ez

sah4ez commented Jul 12, 2019

Copy link
Copy Markdown
Contributor Author

@one1zero1one hi!
send me please version of ctop, I'll try build and see this. Today or tomorrow.

@one1zero1one

Copy link
Copy Markdown

@sah4ez thanks for looking into it, no hurry :)
I'm not a dev - so not sure I did things right - what I did was a make build from the k8s branch.
ctop version 0.7.1, build ae62c38 go1.12.7

@sah4ez

sah4ez commented Jul 12, 2019

Copy link
Copy Markdown
Contributor Author

I builed for this commit. And tested with kubernetes version:

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.0", GitCommit:"925c127ec6b946659ad0fd596fa959be43f0cc05", GitTreeState:"clean", BuildDate:"2017-12-15T21:07:38Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"9+", GitVersion:"v1.9.5-rancher1", GitCommit:"f11c6299ce2b927c3e34ea2afdf57cd08596802f", GitTreeState:"clean", BuildDate:"2018-03-20T16:40:55Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

and all worked well.
Seems that was broken backward compatibility between version API of kubernetes. If you want, I can try with newest version.

@one1zero1one

Copy link
Copy Markdown

Not sure how to go about it, would be nice to support the latest versions, but it's hard when backwards compatibility is an issue.
I'll test on my side also with older k8s versions.

@sah4ez

sah4ez commented Jul 12, 2019

Copy link
Copy Markdown
Contributor Author

Oh... for sure... In kubernetes version 1.8-1.9 was support of heapster for metrics into cluster. And the next versions of kuberntese was changed services for metrics. So me need prepare cluster or minikube with latest versions and add support, if it need anybody)

@sah4ez

sah4ez commented Jul 12, 2019

Copy link
Copy Markdown
Contributor Author

@one1zero1one
For connection to kubernetes use this approach:

        kubeconfig = filepath.Join(homeDir(), ".kube", "config")

	// use the current context in kubeconfig
	config, err := clientcmd.BuildConfigFromFlags("", kubeconfig)
	if err != nil {
		log.Error(err.Error())
}

Please, could you check exist this file $HOME/.kube/confgi?

@sah4ez

sah4ez commented Jul 13, 2019

Copy link
Copy Markdown
Contributor Author

And you can run with environment variable CTOP_DEBUG=1 for get debug logs.
To read logs from unix socket through:

nc -u ./ctop.socks > logs.txt

And attach please output here.

@sah4ez

sah4ez commented Jul 13, 2019

Copy link
Copy Markdown
Contributor Author

And if you can, try build from this PR #176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants