Run .NET 5 API on localhost Kubernetes Cluster

preview_player
Показать описание
video to run a docker container on localhost:

YAML manifest file for local kubernetes deployment
kind: Deployment
apiVersion: apps/v1
metadata:
name: {microservice-name/image-name}
spec:
replicas: 1
selector:
matchLabels:
app: {microservice-name/image-name}
template:
metadata:
labels:
app: {microservice-name/image-name}
spec:
containers:
- name: {container-name}
image: {acr url/image-name}
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: {microservice-name/image-name}
spec:
type: LoadBalancer
ports:
- name: {microservice-name/image-name}
port: 5000
targetPort: 80
selector:
app: {microservice-name/image-name}
Рекомендации по теме
Комментарии
Автор

Im trying to follow this exercise but I get this error when i run the command: kubectl apply -f weather-service.yaml

error: resource mapping not found for name: "verisketl/veriskapi" namespace: "" from "weather-service.yaml": no matches for kind "Service" in version "apps/v1"


i dont understand why it wouldnt find that name given that that is the name of my image and I can see it under the images tab in docker hub? Any thoughts on why im getting this error?

katchinska
visit shbcf.ru