kubectl config use-context cluster1-admin@cluster1
#vim 11.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: cat
namespace: cat
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- path: /cat
pathType: Prefix
backend:
service:
name: cat
port:
number: 80
k apply -f 11.yaml