mysql.yaml
[root@lab2 mysql]# cat mysql.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: name: mysql namespace: development spec: replicas: 1 template: metadata: labels: name: mysql spec: containers: - name: mysql image: 10.1.1.71:5000/library/mysql/latest ports: - containerPort: 3306 --- apiVersion: v1 kind: Service metadata: name: mysql namespace: development spec: type: NodePort ports: - port: 3306 nodePort: 13306 targetPort: 3306 selector: name: mysql --- apiVersion: extensions/v1beta1 kind: Ingress metadata: name: mysql namespace: development spec: rules: - host: mysql http: paths: - path: / backend: serviceName: mysql servicePort: 3306