OpenFaaS
code:install.sh
# パスワードを得る
echo $(kubectl -n openfaas get secret basic-auth -o jsonpath="{.data.basic-auth-password}" | base64 --decode)
# ポートフォワード
kubectl port-forward -n openfaas svc/gateway 8080:8080
code:ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-openfaas
namespace: argocd
spec:
ingressClassName: nginx
rules:
- host: openfaas.k8s.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: service-openfaas
port:
number: 8080
tls:
- hosts:
- openfaas.k8s.example.com
secretName: cert-secret
---
apiVersion: v1
kind: Service
metadata:
name: service-openfaas
namespace: argocd
spec:
type: ExternalName
externalName: gateway.openfaas.svc.cluster.local