Skip to Content

Create Service

Create a Service of type LoadBalancer, replace MYSECRET with your custom SecretName.

apiVersion: v1 kind: Service metadata: name: Surfercloud-nginx labels: app: Surfercloud-nginx spec: type: LoadBalancer ports: - protocol: TCP port: 80 selector: app: Surfercloud-nginx --- apiVersion: v1 kind: Pod metadata: name: test-nginx labels: app: Surfercloud-nginx spec: containers: - name: nginx image: uhub.surfercloud.com/ucloud/nginx:1.9.2 ports: - containerPort: 80 imagePullSecrets: - name: MYSECRET

The system will automatically generate a ULB, and UK8S also supports configuring various parameters of the ULB, for details see service