const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
metadata: {name: '<string>', namespace: '<string>', labels: {}},
data: {},
type: 'Opaque'
})
};
fetch('http://localhost:4065/v1/kubernetes/secrets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));