I can't see my created services on "kubectl services"

Viewed 38

I'm trying to dockerize an multilayered .NET API project then deploy it and SQL Server to Kubernetes. After I have created k8s folder for .yaml files, I encounter a problem.

I have files like this :

enter image description here

And even though I've written same commands for every .yaml files in k8s folder, when I write kubectl get services , I can see only two files which are dotnetapp-mssql-cluster-ip-service and dotnetapp-server-cluster-ip-service . enter image description here

When I try to kubectl create or kubectl apply for other files that I can't see on the services list, it says unchanged . enter image description here

How can I see all my files when I write kubectl get services ?

1 Answers

It seems like you have created a PVC, 2 services, 2 deployments, and an ingress? Based on you re-running kubectl apply -f WebAPI/k8s/ingress-service.yaml and Kubernetes telling you that ingress.networking.k8s.io/dotnetapp is unchanged.

Try run kubectl get ingress. Also remember that resources are not named after the files, but the property name set in metadata within each resource. So you should see an ingress called dotnetapp when running that commands.

Otherwise it seems you can see your other 2 services as expected using kubectl get services?

Related