Last active
June 23, 2022 17:33
-
-
Save cmoulliard/c53df84d1e9199cad18a0cfbdb0d5334 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IP=$(kubectl get node/lima-rancher-desktop -o json | jq -r ".status.addresses[0].address") | |
kubectl create ns demo | |
kubectl delete all,ingress --all -n demo | |
cat << EOF | kubectl apply -n demo -f - | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: whoami | |
name: whoami | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: whoami | |
template: | |
metadata: | |
labels: | |
app: whoami | |
spec: | |
containers: | |
- image: traefik/whoami:latest | |
name: whoami | |
ports: | |
- containerPort: 80 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: whoami-svc | |
spec: | |
type: ClusterIP | |
selector: | |
app: whoami | |
ports: | |
- port: 80 | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: whoami-http | |
annotations: | |
traefik.ingress.kubernetes.io/router.entrypoints: web | |
spec: | |
rules: | |
- host: whoami.$IP.nip.io | |
http: | |
paths: | |
- path: / | |
pathType: Prefix | |
backend: | |
service: | |
name: whoami-svc | |
port: | |
number: 80 | |
EOF |
BarDweller
commented
Jun 23, 2022
•
Traefix reports an issue time="2022-06-23T15:12:37Z" level=error msg="Skipping service: no endpoints found" providerName=kubernetes ingress=whoami-http namespace=demo serviceName=whoami-svc se rvicePort="&ServiceBackendPort{Name:,Number:80,}"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment