lucky-sideburn / kubeinvaders

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

Config namespace #72

Closed rubenlabs closed 10 months ago

rubenlabs commented 10 months ago

I am trying to configure kubeinvaders using helm but it does not detect the indicated namespace.config:

target_namespace where kubeinvaders should be allowed to kill pods

target_namespace: "demo" alienProximity: 10 hitsLimit: 1 updateTime: 0.5

lucky-sideburn commented 10 months ago

Hi @rubenlabs

can you please post the full comand you have launched?

Thanks E

rubenlabs commented 10 months ago

I have followed the instructions to install using helm.

helm repo add kubeinvaders https://lucky-sideburn.github.io/helm-charts/ helm repo update

kubectl create namespace kubeinvaders

helm install kubeinvaders --set-string config.target_namespace="demo" -n kubeinvaders kubeinvaders/kubeinvaders --set ingress.enabled=true --set ingress.hostName=kubeinvaders.io --set deployment.image.tag=v1. 9.6

In this case I have a namespace called "demo" where I have test pods deployed.

I have also tried to deploy applying the helm generating values:

config: target_namespace: "demo"

Thank you very much for the quick response and your support!

lucky-sideburn commented 10 months ago

Hi @rubenlabs

Thank you for you message. I tried with my installation describing the deployment and I see "NAMESPACE: namespace1,namespace2"

[root@k8s1 ~]# kubectl describe deployment kubeinvaders -n kubeinvaders

Name:                   kubeinvaders
Namespace:              kubeinvaders
CreationTimestamp:      Sun, 16 Jul 2023 12:04:54 +0000
Labels:                 app.kubernetes.io/instance=kubeinvaders
                        app.kubernetes.io/managed-by=Helm
                        app.kubernetes.io/name=kubeinvaders
                        helm.sh/chart=kubeinvaders-1.9.5
Annotations:            deployment.kubernetes.io/revision: 4
                        meta.helm.sh/release-name: kubeinvaders
                        meta.helm.sh/release-namespace: kubeinvaders
Selector:               app.kubernetes.io/instance=kubeinvaders,app.kubernetes.io/name=kubeinvaders
Replicas:               1 desired | 1 updated | 1 total | 1 available | 0 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  25% max unavailable, 25% max surge
Pod Template:
  Labels:           app.kubernetes.io/instance=kubeinvaders
                    app.kubernetes.io/managed-by=Helm
                    app.kubernetes.io/name=kubeinvaders
  Annotations:      prometheus.io/scrape: true
  Service Account:  kubeinvaders
  Containers:
   kubeinvaders:
    Image:      10.10.10.3:5000/kubeinvaders:v1.9.6_tux
    Port:       8080/TCP
    Host Port:  0/TCP
    Environment:
      ENDPOINT:        kubeinvaders.platformengineering.it
      NAMESPACE:       namespace1,namespace2
      ALIENPROXIMITY:  10
      HITSLIMIT:       1
      UPDATETIME:      0.5
    Mounts:            <none>
  Volumes:             <none>
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Progressing    True    NewReplicaSetAvailable
  Available      True    MinimumReplicasAvailable
OldReplicaSets:  kubeinvaders-79f4b9b8c4 (0/0 replicas created), kubeinvaders-bfd675b95 (0/0 replicas created), kubeinvaders-78849ff49b (0/0 replicas created)
NewReplicaSet:   kubeinvaders-644fc7c9fc (1/1 replicas created)
Events:          <none>

I have some question for you.

Thanks, Eugenio

lucky-sideburn commented 10 months ago

Dear @rubenlabs

For me it works. I tried on K3S...

immagine

helm install kubeinvaders --set-string config.target_namespace="demo" -n kubeinvaders kubeinvaders/kubeinvaders --set ingress.enabled=true --set ingress.hostName=kubeinvaders.io --set deployment.image.tag=v1.9.6

rubenlabs commented 10 months ago

Hello, thanks again for the response. In this case I am trying to deploy the solution on EKS but I have been seeing different posts and in some I have seen that Kubeinvaders does not support EKS, is this true? In that case, I will try deploying on minikube to see how it works.

lucky-sideburn commented 10 months ago

Hi @rubenlabs

Yes EKS is not supported :D

I need to do test on it...

Regards, Eugenio

rubenlabs commented 10 months ago

Hi @lucky-sideburn,

Perfect then! I'll see if I can do some testing in a different environment :) In the case of EKS I have been able to deploy without problems and the application opens correctly but does not show the namespace that is selected (in case it helps you when you review it). Thank you very much for your answers and congratulations, it seems interesting and fun!