使用 cat 方式修改文件内容
命令: cat << EOF > 文件名称
root@noway-587f65cd54-767sk:~/noway# cat << EOF > ingress.yaml
> apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: nginx-service-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
rules:
- host: {company}.test4u.cn
http:
paths:
- path:
backend:
serviceName: {company}-system-edge-ui-app
servicePort: 80
>
> EOF
root@noway-587f65cd54-767sk:~/noway#