This example is based on the official Kubernetes WordPress tutorial.
Generate the Kubernetes architecture diagram for WordPress manifests:
$ kube-diagrams -o wordpress *.yaml
Start a minikube cluster:
$ minikube start --memory 5120 --cpus=4
Deploy the WordPress application:
$ kubectl apply -f mysql-pass.yaml
$ kubectl apply -f mysql-deployment.yaml
$ kubectl apply -f wordpress-deployment.yaml
Wait a few minutes for the WordPress application to be deployed.
Get all Kubernetes resources in the default
namespace:
$ kubectl get all,sa,cm,secret,pvc,pv,sc -o=yaml > namespace_default.yml
Generate a Kubernetes architecture diagram for the default
namespace:
$ kube-diagrams namespace_default.yml
Generate a Kubernetes architecture diagram for the default
namespace but hide ReplicaSet objects:
$ kube-diagrams -c hide_replicaset.kd -o namespace_default_without_replicaset.png namespace_default.yml
Delete the WordPress application:
$ kubectl delete -f wordpress-deployment.yaml
$ kubectl delete -f mysql-deployment.yaml
$ kubectl delete -f mysql-pass.yaml
Generate a custom diagram where the WordPress application is deployed in AWS EKS.
$ kube-diagrams -c custom_diagram.kd -o wordpress_deployed_in_aws_eks namespace_default.yml
Architecture diagram for WordPress manifests:
Architecture diagram for a deployed WordPress instance:
Architecture diagram for a deployed WordPress instance but without ReplicaSet objects:
Architecture diagram for a WordPress application deployed in AWS EKS: