Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Application that i want to expose outside cluster:
- [root@cent-gluster-workstation ~]# cat gitlab-service.yaml
- apiVersion: v1
- kind: Service
- metadata:
- creationTimestamp: null
- labels:
- io.kompose.service: gitlab
- name: gitlab
- spec:
- type: LoadBalancer
- ports:
- - name: "443"
- port: 443
- targetPort: 443
- - name: "80"
- port: 80
- targetPort: 80
- - name: "10022"
- port: 10022
- targetPort: 22
- selector:
- io.kompose.service: gitlab
- status:
- loadBalancer: {}
- --------------------------------------------------------------
- [root@cent-gluster-workstation ~]# cat gitlab-ingress.yaml
- apiVersion: extensions/v1beta1
- kind: Ingress
- metadata:
- name: gitlab-ingress
- spec:
- backend:
- serviceName: gitlab
- servicePort: 80
- --------------------------------------------------------------
- [root@cent-gluster-workstation service-loadbalancer]# cat rc.yaml
- apiVersion: v1
- kind: ReplicationController
- metadata:
- name: service-loadbalancer
- labels:
- app: service-loadbalancer
- version: v1
- spec:
- replicas: 1
- selector:
- app: service-loadbalancer
- version: v1
- template:
- metadata:
- labels:
- app: service-loadbalancer
- version: v1
- spec:
- nodeSelector:
- role: loadbalancer
- containers:
- - image: gcr.io/google_containers/servicelb:0.4
- imagePullPolicy: Always
- livenessProbe:
- httpGet:
- path: /healthz
- port: 8081
- scheme: HTTP
- initialDelaySeconds: 30
- timeoutSeconds: 5
- name: haproxy
- ports:
- # All http services
- - containerPort: 80
- hostPort: 80
- protocol: TCP
- # nginx https
- - containerPort: 443
- hostPort: 8080
- protocol: TCP
- # haproxy stats
- - containerPort: 1936
- hostPort: 1936
- protocol: TCP
- resources: {}
- --------------------------------------------------------------
- [root@cent-gluster-workstation ~]# kubectl get -o yaml svc gitlab
- apiVersion: v1
- kind: Service
- metadata:
- annotations:
- kubectl.kubernetes.io/last-applied-configuration: |
- {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"creationTimestamp":null,"labels":{"io.kompose.service":"gitlab"},"name":"gitlab","namespace":"default"},"spec":{"ports":[{"name":"443","port":443,"targetPort":443},{"name":"80","port":80,"targetPort":80},{"name":"10022","port":10022,"targetPort":22}],"selector":{"io.kompose.service":"gitlab"},"type":"LoadBalancer"},"status":{"loadBalancer":{}}}
- creationTimestamp: 2017-09-08T09:42:31Z
- labels:
- io.kompose.service: gitlab
- name: gitlab
- namespace: default
- resourceVersion: "321850"
- selfLink: /api/v1/namespaces/default/services/gitlab
- uid: 08ea0247-947a-11e7-91f5-023b4c0eea15
- spec:
- clusterIP: 10.43.85.137
- externalTrafficPolicy: Cluster
- ports:
- - name: "443"
- nodePort: 30812
- port: 443
- protocol: TCP
- targetPort: 443
- - name: "80"
- nodePort: 32483
- port: 80
- protocol: TCP
- targetPort: 80
- - name: "10022"
- nodePort: 31588
- port: 10022
- protocol: TCP
- targetPort: 22
- selector:
- io.kompose.service: gitlab
- sessionAffinity: None
- type: LoadBalancer
- status:
- loadBalancer:
- ingress:
- - ip: 10.128.0.10
- - ip: 10.128.0.10
- - ip: 10.128.0.10
- --------------------------------------------------------------
- [root@cent-gluster-workstation ~]# kubectl get ing
- NAME HOSTS ADDRESS PORTS AGE
- gitlab-ingress * 10.128.0.14 80 35m
Add Comment
Please, Sign In to add comment