Here are the kubenetes configs for staging environment
yaml
# staging-namespace.yaml
apiVersion: v1
kind: Namespace
metadata:
name: staging
yaml
# frontend-pod.staging.yaml
apiVersion: v1
kind: Pod
metadata:
name: short-frontend
namespace: staging
labels:
app: short
tier: frontend
spec:
containers:
- name: short-frontend
image: byliuyang/short-frontend
imagePullPolicy: IfNotPresent
restartPolicy: Always
yaml
# frontend-service.staging.yaml
apiVersion: v1
kind: Service
metadata:
namespace: staging
name: short-frontend
spec:
selector:
app: short
tier: frontend
ports:
- port: 80
yaml
# frontend-ingress.staging.yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
namespace: staging
name: short-frontend
spec:
tls:
- hosts:
- staging.short-d.com
secretName: short-d.com-tls
rules:
- host: staging.short-d.com
http:
paths:
- backend:
serviceName: short-frontend
servicePort: 80