Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Correcting commands in Ingress configuration from EKS docs. #1456

Merged
merged 5 commits into from
Sep 6, 2024

Conversation

drauedo
Copy link
Contributor

@drauedo drauedo commented Aug 28, 2024

Motivation

The current commands for configuring the ingress in the EKS documentation don't have the proper indentation:

cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Service
metadata:
  name: nginx
spec:
  selector:
    app: fancier-nginx
  ports:
- name: http
    protocol: TCP
    port: 80
    targetPort: 80
EOF
cat <<EOF | kubectl apply -f -
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: nginx
  annotations:
    ingress.kubernetes.io/ssl-redirect: "false"
spec:
  rules:
- http:
      paths:
  - path: /test123
        pathType: Prefix
        backend:
          service:
            name: nginx
            port:
              number: 80
EOF

When running it I receive the following message error:

error: error parsing STDIN: error converting YAML to JSON: yaml: line 8: did not find expected key

@drauedo drauedo requested a review from dfangl as a code owner August 28, 2024 14:18
Copy link

github-actions bot commented Aug 28, 2024

🎊 PR Preview has been successfully built and deployed to https://localstack-docs-preview-pr-1456.surge.sh 🎊

Copy link
Contributor

@MarcelStranak MarcelStranak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix.

Can you please also update this part https://localstack-docs-preview-pr-1456.surge.sh/user-guide/aws/eks/#routing-traffic-to-services-on-different-endpoints?

Here is the fixed version

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: multi-services
  annotations:
    ingress.kubernetes.io/ssl-redirect: "false"
spec:
  rules:
  - host: eks-service-1.localhost.localstack.cloud
    http:
      paths:
      - path: /v1
        pathType: Prefix
        backend:
          service:
            name: service-1
            port:
              number: 80
  - host: eks-service-2.localhost.localstack.cloud
    http:
      paths:
      - path: /v1
        pathType: Prefix
        backend:
          service:
            name: service-2
            port:
              number: 80

Copy link
Contributor

@MarcelStranak MarcelStranak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@drauedo drauedo merged commit aba80f0 into main Sep 6, 2024
5 checks passed
@drauedo drauedo deleted the docs-eks-correction branch September 6, 2024 09:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants