To expose the dev-app container as a service on port 30081 on the controlplane node, you can create a Kubernetes service of type NodePort. Here are the steps to do it:
1. Write a YAML file for the service definition. For example, create a file named dev-app-service.yaml with the following content:
```
apiVersion: v1
kind: Service
metadata:
name: dev-app-service
spec:
type: NodePort
selector:
app: dev-app
ports:
- name: http
port: 80
targetPort: 80
nodePort: 30081
```
2. Apply the YAML file to create the service:
```
kubectl apply -f dev-app-service.yaml
```
This will create a service named dev-app-service of type NodePort. The service will select the pods with the label app=dev-app. It will expose port 80 on the pod as port 30081 on all the nodes in the cluster.
3. Verify that the service is created:
```
kubectl get svc dev-app-service
```
This will output the details of the service, including the external IP address that you can use to access the application on port 30081:
```
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
dev-app-service NodePort 10.101.86.228 <none> 80:30081/TCP 1m
```