lucky-sideburn / kubeinvaders

Gamified Chaos Engineering Tool for Kubernetes
Apache License 2.0
1.03k stars 127 forks source link

API Endpoint in OCP 3.11 #16

Closed haarchri closed 4 years ago

haarchri commented 5 years ago

Hello - we would also use you tool for DEMO ;)

But we have Problems that the KubeInvaders UI shows up Error Connecting to

https://{ENDPOINT}/kube

Why you are using kube Endpoint ?

lucky-sideburn commented 5 years ago

Hi :)

Did you use Helm or manual installation for Openshift 3.11?

If you used this method https://github.com/lucky-sideburn/KubeInvaders#install-kubeinvaders-on-openshift check if you configured $ROUTE_HOST and if your client machine reach the $ROUTE_HOST at TCP port 443.

smakam commented 4 years ago

Hi I am trying this on kubernetes cluster with both manual and helm approach and I get the same error that its not able to connect to kube endpoint.

noamsh-tr commented 4 years ago

Same for me.

lucky-sideburn commented 4 years ago

Which is the URL that you use to reach kubeinvaders from your browser?

smakam commented 4 years ago

I tried 2 approaches: using localhost and port-forwarding from the pod using ingress IP, the ingress has the host specified, had to remove that piece.

lucky-sideburn commented 4 years ago

The correct one is pointing to the ingress or route (if you use Openshift).

smakam commented 4 years ago

What should be the approach for kubernetes case?

lucky-sideburn commented 4 years ago

Use the Helm chart for Kubernetes please.

helm install --set-string target_namespace="namespace1\,namespace2" --name kubeinvaders --namespace kubeinvaders ./helm-charts/kubeinvaders

smakam commented 4 years ago

yes, i used the helm chart approach and the manual approach and I faced the issue mentioned above with both cases.

lucky-sideburn commented 4 years ago

This error? Error Connecting to https://{ENDPOINT}/kube ?

smakam commented 4 years ago

yes, thats correct.

lucky-sideburn commented 4 years ago

Ok no problem! let's do it together :)

I installed it with helm. Did you helm installation create these object?

NAME: kubeinvaders LAST DEPLOYED: Wed Jan 29 07:05:27 2020 NAMESPACE: kubeinvaders STATUS: DEPLOYED

RESOURCES: ==> v1/ClusterRole NAME AGE kubeinvaders 0s

==> v1/ClusterRoleBinding NAME AGE kubeinvaders 0s

==> v1/Deployment NAME READY UP-TO-DATE AVAILABLE AGE kubeinvaders 0/1 1 0 0s

==> v1/Pod(related) NAME READY STATUS RESTARTS AGE kubeinvaders-686b5474fd-ct59v 0/1 Pending 0 0s

==> v1/Secret NAME TYPE DATA AGE kubeinvaders-sa-token kubernetes.io/service-account-token 3 0s

==> v1/Service NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubeinvaders ClusterIP 10.43.86.146 8080/TCP 0s

==> v1beta1/Ingress NAME HOSTS ADDRESS PORTS AGE kubeinvaders kubeinvaders.local 80, 443 0s

NOTES:

  1. Get the application URL by running these commands: https://kubeinvaders.local/

Do you have an ingress like this?

ns304365:~/KubeInvaders# kubectl get ingress -n kubeinvaders NAME HOSTS ADDRESS PORTS AGE kubeinvaders kubeinvaders.local 10.10.10.12,10.10.10.13,10.10.10.14 80, 443 8m37s

And please let me know if your client resolv kubeinvaders.local

lucky-sideburn commented 4 years ago

@smakam please check also this variable:

ns304365:~/KubeInvaders/helm-charts# grep -ri "ROUTE_HOST" * kubeinvaders/templates/deployment.yaml: - name: ROUTE_HOST kubeinvaders/templates/deployment.yaml: value: "{{ .Values.route_host }}"

in values.yaml there is route_host: kubeinvaders.local that will be https://{ENDPOINT}/kube

smakam commented 4 years ago

Thanks @lucky-sideburn .

Following is the helm install command I used: helm install --set-string target_namespace="default" kubeinvaders --namespace kubeinvaders kubeinvaders/kubeinvaders

ingress output: $ kubectl get ingress -n kubeinvaders NAME HOSTS ADDRESS PORTS AGE kubeinvaders kubeinvaders.local 80, 443 4m

I see that there is an error in ingress creation, following is the description: error while evaluating the ingress spec: service "kubeinvaders/kubeinvaders" is type "ClusterIP", expected "NodePort" or "LoadBalancer" I see that service type "kubeinvaders" created by helm is of clusterip and not "nodeport"

Should I update dns entry for kubeinvaders.local?

not sure if its possible to do hangout or something...

lucky-sideburn commented 4 years ago

Yes please resolve DNS kubeinvaders.local with the ingress node IP addresses!

Maybe is there something with your ingress controller that I have to fix in Kubeinvaders helm chart.

Can you please have a look of this https://config9.com/apps/kubernetes/why-does-google-cloud-show-an-error-when-using-clusterip/ ? Are you using Google Cloud?

smakam commented 4 years ago

yes, i am using Google cloud. In gcp, we need service type to be nodeport for ingress.

maybe this annotation would help? annotations: kubernetes.io/ingress.class: "nginx"

assuming that i solve ingress problem, do i need to setup dns entry or directly access ingress ip?

noamsh-tr commented 4 years ago

I'm using AKS and I get the same error, see configuration created below:

`$kubectl get deployments -n kubeinvaders NAME READY UP-TO-DATE AVAILABLE AGE kubeinvaders 1/1 1 1 71s

$kubectl get pods -n kubeinvaders NAME READY STATUS RESTARTS AGE kubeinvaders-567684d6fb-l9kmk 1/1 Running 0 87s

$kubectl get secrets -n kubeinvaders NAME TYPE DATA AGE default-token-pkv6q kubernetes.io/service-account-token 3 103s kubeinvaders-token kubernetes.io/service-account-token 3 99s kubeinvaders-token-dzc86 kubernetes.io/service-account-token 3 99s sh.helm.release.v1.kubeinvaders.v1 helm.sh/release.v1 1 100s

$kubectl get svc -n kubeinvaders NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubeinvaders ClusterIP 10.0.52.17 8080/TCP 2m4s

$kubectl describe ingress kubeinvaders -n kubeinvaders Name: kubeinvaders Namespace: kubeinvaders Address:
Default backend: default-http-backend:80 () TLS: chart-example-tls terminates chart-example.local Rules: Host Path Backends


kubeinvaders.local
/ kubeinvaders:http (10.171.229.70:8080) Annotations: nginx.ingress.kubernetes.io/ssl-redirect: true Events: `

lucky-sideburn commented 4 years ago

Hi guys! Ok I will try to deploy Kubeinvaders in AKS and let you know :) Have a look of this: https://blog.dbi-services.com/provisioning-a-aks-cluster-and-kubeinvaders-with-terraform-aks/

sanrum21 commented 4 years ago

Hi Also tried in kubernetes cluster and even for me it says not able to connect to the endpoint.

And i have used manifest files to deploy kube invaders.

http:s//{hostname}/kube

can you please help me here

lucky-sideburn commented 4 years ago

Hi @sanrum21 and @noamsh-etoro I am very sorry for my delay :( I going to relaase a new mode of deploy kubeinvaders that will solve your problems!

lucky-sideburn commented 4 years ago

I added client for MacOS and Linux! Your workstation should reach your kubernetes cluster.

https://github.com/lucky-sideburn/KubeInvaders/releases/download/0.2.9-helm/x86_64-darwin.zip https://github.com/lucky-sideburn/KubeInvaders/releases/download/0.2.9-helm/x86_64-linux.zip

Please create configuration file in your $HOME named .KubeInv.json

For example: eugenio@LuckySideburn:~$ cat /Users/eugenio/.KubeInv.json { "token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjRfYXRBNW9LamplRmFMTzNONUdUZXk3ZHVWSWwtSTByU", "endpoint": "https://rancher.accolli.it:6443", "namespace": "daas,docker-registry" }

sanrum21 commented 4 years ago

Hi Lucky-Sideburn/Kubeinvaders, which token i should use it in the jsob file ? Can you please help me on this.

Regards, SAnthanakumar .A

On Sun, May 3, 2020 at 7:47 PM Eugenio Marzo notifications@github.com wrote:

I added client for MacOS and Linux! Your workstation should reach your kubernetes cluster.

https://github.com/lucky-sideburn/KubeInvaders/releases/download/0.2.9-helm/x86_64-darwin.zip

https://github.com/lucky-sideburn/KubeInvaders/releases/download/0.2.9-helm/x86_64-linux.zip

Please create configuration file in your $HOME named .KubeInv.json

For example: eugenio@LuckySideburn:~$ cat /Users/eugenio/.KubeInv.json { "token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjRfYXRBNW9LamplRmFMTzNONUdUZXk3ZHVWSWwtSTByU", "endpoint": "https://rancher.accolli.it:6443", "namespace": "daas,docker-registry" }

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lucky-sideburn/KubeInvaders/issues/16#issuecomment-623116914, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGUQD37H6HZ6NCLKKW2KSVTRPV4IVANCNFSM4JN7MQ3A .

sanrum21 commented 4 years ago

And also could you please let me know any dependency is required to run the binary ? when i tried to execute it tells some library is missing .

[root@helm-master KubeInvaders]# ./KubeInvaders.x86_64 ./KubeInvaders.x86_64: error while loading shared libraries: libopenal.so.1: cannot open shared object file: No such file or directory

I am running in Centos 7.4

[root@helm-master KubeInvaders]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core)

Thanks and Regards, Santhanakumar .A

On Sun, May 3, 2020 at 7:47 PM Eugenio Marzo notifications@github.com wrote:

I added client for MacOS and Linux! Your workstation should reach your kubernetes cluster.

https://github.com/lucky-sideburn/KubeInvaders/releases/download/0.2.9-helm/x86_64-darwin.zip

https://github.com/lucky-sideburn/KubeInvaders/releases/download/0.2.9-helm/x86_64-linux.zip

Please create configuration file in your $HOME named .KubeInv.json

For example: eugenio@LuckySideburn:~$ cat /Users/eugenio/.KubeInv.json { "token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjRfYXRBNW9LamplRmFMTzNONUdUZXk3ZHVWSWwtSTByU", "endpoint": "https://rancher.accolli.it:6443", "namespace": "daas,docker-registry" }

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lucky-sideburn/KubeInvaders/issues/16#issuecomment-623116914, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGUQD37H6HZ6NCLKKW2KSVTRPV4IVANCNFSM4JN7MQ3A .

lucky-sideburn commented 4 years ago

Hi @

And also could you please let me know any dependency is required to run the binary ? when i tried to execute it tells some library is missing . [root@helm-master KubeInvaders]# ./KubeInvaders.x86_64 ./KubeInvaders.x86_64: error while loading shared libraries: libopenal.so.1: cannot open shared object file: No such file or directory I am running in Centos 7.4 [root@helm-master KubeInvaders]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) Thanks and Regards, Santhanakumar .A On Sun, May 3, 2020 at 7:47 PM Eugenio Marzo @.***> wrote: I added client for MacOS and Linux! Your workstation should reach your kubernetes cluster. https://github.com/lucky-sideburn/KubeInvaders/releases/download/0.2.9-helm/x86_64-darwin.zip https://github.com/lucky-sideburn/KubeInvaders/releases/download/0.2.9-helm/x86_64-linux.zip Please create configuration file in your $HOME named .KubeInv.json For example: eugenio@LuckySideburn:~$ cat /Users/eugenio/.KubeInv.json { "token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjRfYXRBNW9LamplRmFMTzNONUdUZXk3ZHVWSWwtSTByU", "endpoint": "https://rancher.accolli.it:6443", "namespace": "daas,docker-registry" } — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#16 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGUQD37H6HZ6NCLKKW2KSVTRPV4IVANCNFSM4JN7MQ3A .

lucky-sideburn commented 4 years ago

Hi @sanrum21 if you choose to use KubeInvaders from client workstation you need a desktop with desktop environment. I tried the bundle with MaOS and not with Linux.

The token is a token of a service account that can view your target namespace. It should be able to get,list,delete pods and pods/log.

I also fixed the helm chart if you want deploy kubeinvaders directly into kubernetes.

sanrum21 commented 4 years ago

Ok the I will tey to deploy through helm chart. How I can uninstall already deployed version of kubeinvaders?

Thanks and Regards Santhanakumar. A

On Wed, 13 May 2020, 17:23 Eugenio Marzo, notifications@github.com wrote:

Hi @sanrum21 https://github.com/sanrum21 if you choose to use KubeInvaders from client workstation you need a desktop with desktop environment. I tried the bundle with MaOS and not with Linux.

The token is a token of a service account that can view your target namespace. It should be able to get,list,delete pods and pods/log.

I also fixed the helm chart if you want deploy kubeinvaders directly into kubernetes.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lucky-sideburn/KubeInvaders/issues/16#issuecomment-627932061, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGUQD32JKJXMXCPZCGZ5H7LRRKC27ANCNFSM4JN7MQ3A .

lucky-sideburn commented 4 years ago

Ok the I will tey to deploy through helm chart. How I can uninstall already deployed version of kubeinvaders? Thanks and Regards Santhanakumar. A On Wed, 13 May 2020, 17:23 Eugenio Marzo, @.***> wrote: Hi @sanrum21 https://github.com/sanrum21 if you choose to use KubeInvaders from client workstation you need a desktop with desktop environment. I tried the bundle with MaOS and not with Linux. The token is a token of a service account that can view your target namespace. It should be able to get,list,delete pods and pods/log. I also fixed the helm chart if you want deploy kubeinvaders directly into kubernetes. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#16 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGUQD32JKJXMXCPZCGZ5H7LRRKC27ANCNFSM4JN7MQ3A .

if you deployed kubeinvaders manually into a namespace that contains only kubeinvaders you have to clean or delete that namespace.