yky32 / k8s-starter

K8s for Microservices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

k8s-starter

K8s for Microservices

https://github.com/yky32/k8s-devops/blob/master/kubernetes/cloud/digitalocean/getting-started.md

Ingress-nginx

Quick start

https://kubernetes.github.io/ingress-nginx/deploy/#quick-start

Idea and Concept: ingress-to-service.png

Release "ingress-nginx" does not exist. Installing it now.
NAME: ingress-nginx
LAST DEPLOYED: Fri Apr  7 14:57:28 2023
NAMESPACE: ingress-nginx
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
The ingress-nginx controller has been installed.
It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status by running 'kubectl --namespace ingress-nginx get services -o wide -w ingress-nginx-controller'

An example Ingress that makes use of the controller:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example
namespace: foo
spec:
ingressClassName: nginx
rules:
  - host: www.example.com
    http:
      paths:
        - pathType: Prefix
          backend:
            service:
              name: exampleService
              port:
                number: 80
          path: /
# This section is only required if TLS is to be enabled for the Ingress
tls:
  - hosts:
    - www.example.com
    secretName: example-tls

If TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided:

  apiVersion: v1
  kind: Secret
  metadata:
    name: example-tls
    namespace: foo
  data:
    tls.crt: <base64 encoded cert>
    tls.key: <base64 encoded key>
  type: kubernetes.io/tls

About

K8s for Microservices