我已经按照此链接https://kubernetes.io/blog/2019/07/23/get-started-with-kubernetes-using-python/创建了 python 应用程序。我想配置AWS ALB Ingress Controller/nginx controller
,ingress resource
但我无法理解该文件。我没有在 ec2-instance 上使用 Kops 的域,想在没有任何域的情况下对其进行配置。任何帮助,将不胜感激。
部署:
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-python
spec:
selector:
matchLabels:
app: hello-python
template:
metadata:
labels:
app: hello-python
spec:
containers:
- name: hello-python
image: hello-python:latest
ports:
- containerPort: 5000
服务
apiVersion: v1
kind: Service
metadata:
name: hello-python-service
spec:
selector:
app: hello-python
type: NodePort
ports:
- nodePort: 30010
port: 6000
targetPort: 5000