Git Product home page Git Product logo

Comments (7)

mkimuram avatar mkimuram commented on August 27, 2024 2

@pdstefan

Thank you for your feedback. Could you try without -i mkimuram/k8sviz:devel option?

sudo ./k8sviz.sh -n viz-demo-deployment  -t png -o viz-demo-deployment.png

I noticed that I accidentally overwrite the mkimuram/k8sviz:devel image without this feature (and worked as you pointed out). Without the option, it should use 0.3.1 image and work fine.

As always: thank you for your time!

Thank you too for your time!

from k8sviz.

mkimuram avatar mkimuram commented on August 27, 2024

@pdstefan

Thank you for reporting the issue.

PR #33 should fix this issue and I've pushed the test image as mkimuram/k8sviz:devel mkimuram/k8sviz:0.3.1.
Could you test with -i mkimuram/k8sviz:devel option added to check if it works as expected?
(Any feedback is welcome, like adding option to toggle whether to show old ones).

Note that I tested with the below deployment and confirmed that old Replicaset is not shown.

kubectl create deploy --image=nginx nginx
kubectl scale --replicas=3 deploy/nginx
kubectl set image deploy/nginx nginx=nginx:stable

from k8sviz.

mkimuram avatar mkimuram commented on August 27, 2024

Above PR is merged and the image is updated. Feel free to open this issue, if it needs any improvements. Thank you for your reporting issue.

from k8sviz.

pdstefan avatar pdstefan commented on August 27, 2024

Just tried the devel image and I still see the previous replicasets. For clarification: we are deploying using kustomize and the replicasets are the observed "previous generations" of the same deployment (usually only minor changes like image version and limits).

Result of: sudo ./k8sviz.sh -n xyq -t png -o dia.png -i mkimuram/k8sviz:devel

dia

Thank you.

from k8sviz.

mkimuram avatar mkimuram commented on August 27, 2024

@pdstefan

Thank you for your comments.

How is the DESIRED and CURRENT shown for your "previous generations" of replicasets for the same deployment?

In my environment, for the below commands:

kubectl create deploy --image=nginx nginx
kubectl scale --replicas=3 deploy/nginx
kubectl set image deploy/nginx nginx=nginx:stable

DESIRED and CURRENT for the old replicaset are 0.

kubectl get all
NAME                         READY   STATUS    RESTARTS   AGE
pod/nginx-7cd7b48495-8kptb   1/1     Running   0          9s
pod/nginx-7cd7b48495-cjjn6   1/1     Running   0          7s
pod/nginx-7cd7b48495-hjhg6   1/1     Running   0          11s

NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
service/kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP   12d

NAME                    READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/nginx   3/3     3            3           36s

NAME                               DESIRED   CURRENT   READY   AGE
replicaset.apps/nginx-6799fc88d8   0         0         0       36s
replicaset.apps/nginx-7cd7b48495   3         3         3       11s

And the latest k8sviz exclude such replicaset and show the result for ./k8sviz.sh -t png -o nostalers.png.

from k8sviz.

mkimuram avatar mkimuram commented on August 27, 2024

Note that I've just updated the k8sviz.sh to ensure the latest image is used. So, to test the latest image, please re-install(re-download) k8sviz.sh.

from k8sviz.

pdstefan avatar pdstefan commented on August 27, 2024

Hi. Sorry for the late reply (work is hell lately).

Try this :

cat << EOK > nginx-deploy.yaml
apiVersion: v1
kind: Service
metadata:
  name: my-service
  namespace: viz-demo-deployment
  labels:
    app: my-app
spec:
  selector:
    app: my-app
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-deployment
  namespace: viz-demo-deployment
  labels:
    app: my-app
spec:
  replicas: 3
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
      - name: nginx
        image: nginx:1.17.10
        ports:
        - containerPort: 80
EOK 
kubectl create ns viz-demo-deployment
kubectl apply -f nginx-deploy.yaml
sed -i 's/nginx:1.17.10/nginx:1.19.2/' nginx-deploy.yaml
kubectl apply -f nginx-deploy.yaml 
sed -i 's/nginx:1.19.2/nginx:1.21.0/' nginx-deploy.yaml
kubectl apply -f nginx-deploy.yaml 
sudo ./k8sviz.sh -n viz-demo-deployment  -t png -o viz-demo-deployment.png -i mkimuram/k8sviz:devel #used the latest k8sviz.sh version 

viz-demo-deployment

You can see that the previous generations of the ReplicaSets (generated by the previous deployments) show up (in the previous image I posted up to 10 generations are tracked) . Am I doing something wrong?

As always: thank you for your time!

from k8sviz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.