dcasati / kubernetes-PlantUML

Kubernetes diagrams using VS Code
MIT License
248 stars 47 forks source link

Kubernetes icons don't appear in the diagram #8

Closed vishal-yadav closed 3 years ago

vishal-yadav commented 3 years ago

Hi @dcasati I was trying to get started with generating K8s plantuml diagram for sample example kuberentes.puml however kubernetes icons seems missing in the generated diagram (preview). Can you suggest if I am missing something here. Thanks!

k8s-plantuml
dcasati commented 3 years ago

hey @vishal-yadav! It's to say from the text, could you please paste your config here ? I can try to check on my machine :)

vishal-yadav commented 3 years ago

By config if you mean puml file then it's exactly the same sample/kubernetes.puml in repo.

@startuml kubernetes

footer Kubernetes Plant-UML
scale max 1024 width

skinparam nodesep 10
skinparam ranksep 10

' Kubernetes
!includeurl https://raw.githubusercontent.com/dcasati/kubernetes-PlantUML/master/dist/kubernetes_Context.puml

!define KubernetesPuml https://raw.githubusercontent.com/dcasati/kubernetes-PlantUML/master/dist

!includeurl KubernetesPuml/kubernetes_Context.puml
!includeurl KubernetesPuml/kubernetes_Simplified.puml

!includeurl KubernetesPuml/OSS/KubernetesApi.puml
!includeurl KubernetesPuml/OSS/KubernetesSvc.puml
!includeurl KubernetesPuml/OSS/KubernetesIng.puml
!includeurl KubernetesPuml/OSS/KubernetesPod.puml
!includeurl KubernetesPuml/OSS/KubernetesRs.puml
!includeurl KubernetesPuml/OSS/KubernetesDeploy.puml
!includeurl KubernetesPuml/OSS/KubernetesHpa.puml

actor "User" as userAlias
left to right direction

' Kubernetes Components
Cluster_Boundary(cluster, "Kubernetes Cluster") {
    Namespace_Boundary(ns, "Back End") {
        KubernetesIng(ingress, "your.domain.com", "")
        KubernetesSvc(svc, "service", "")
        KubernetesPod(pod1, "pod1", "")
        KubernetesPod(pod2, "pod2", "")
        KubernetesPod(pod3, "pod3", "")

        KubernetesRs(rs,"","")
        KubernetesDeploy(deploy,"deployment","")
        KubernetesHpa(hpa, "HPA", "")
    }
}

Rel(userAlias,ingress," ")
Rel(ingress,svc," ")

Rel(svc,pod1," ")
Rel(svc,pod2," ")
Rel(svc,pod3," ")

Rel_U(rs,pod1," ")
Rel_U(rs,pod2," ")
Rel_U(rs,pod3," ")

Rel_U(deploy,rs, " ")
Rel_U(hpa,deploy, " ")

@enduml
vishal-yadav commented 3 years ago

Looks like I may be missing some package/dependency (in addition to pre-requisite graphviz) on my CentOS VM. The sample example works with VS code on my Windows machine.