How can I use Ambassador with kubernetes?

7/17/2021

I am trying to learn Ambassador with kubernetes but ı got stuck something.I have 3 files:

enter image description here

ambassador-service.yml:

---
apiVersion: v1
kind: Service
metadata:
  name: ambassador
spec:
  type: LoadBalancer
  externalTrafficPolicy: Local
  ports:
    - name: http
      protocol: TCP
      port: 80
      targetPort: 8080
  selector:
    service: ambassador

deployment.yaml:

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: kubernetes-tutorial-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kubernetes-tutorial-deployment
  template:
    metadata:
      labels:
        app: kubernetes-tutorial-deployment
    spec:
      containers:
      - name: kubernetes-tutorial-application
        image: auth0blog/kubernetes-tutorial
        ports:
          - containerPort: 3000

service.yml:

---
apiVersion: v1
kind: Service
metadata:
  name: kubernetes-tutorial-service
  annotations:
    getambassador.io/config: |
      ---
      apiVersion: ambassador/v1
      kind: Mapping
      name: kubernetes-tutorial-mapping
      prefix: /
      service: kubernetes-tutorial-service
      host_rewrite: kubernetes-tutorial-service
spec:
  ports:
    - port: 80
      targetPort: 3000
      name: http
      protocol: TCP
  selector:
    app: kubernetes-tutorial-deployment

when I check service :

kubectl get svc ambassador

enter image description here

kubectl get all -n ambassador

enter image description here

but the Result is an empty page. What am I doing wrong? I have to see the below result (Tweeto!)

enter image description here

According to this article what I used for my learning curve. I have to see the below page : enter image description here

article : https://auth0.com/blog/kubernetes-tutorial-step-by-step-introduction-to-basic-concepts/

-- loki
ambassador
devops
kubernetes
kubernetes-ingress

0 Answers