Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Node.js client library for Google's Kubernetes Kubectl And API
Install:
npm install k8s
var K8s = require('k8s')
// use kubectl
var kubectl = K8s.kubectl({
endpoint: 'http://192.168.10.10:8080'
, binary: '/usr/local/bin/kubectl'
})
//use restful api
var kubeapi = K8s.api({
endpoint: 'http://192.168.10.10:8080'
, version: 'v1'
})
// method GET
kubeapi.get('namespaces/default/replicationcontrollers', function(err, data){})
// method POST
kubeapi.post('namespaces/default/replicationcontrollers', require('./rc/nginx-rc.json'), function(err, data){})
// method PUT
kubeapi.put('namespaces/default/replicationcontrollers/nginx', require('./rc/nginx-rc.json'), function(err, data){})
// method PATCH
kubeapi.patch('namespaces/default/replicationcontrollers/nginx', { apiVersion: 'v1' , spec: { replicas: 2 } }, function(err, data){})
// method DELETE
kubeapi.delete('namespaces/default/replicationcontrollers/nginx', function(err, data){})
// method GET -> watch
kubeapi.watch('watch/namespaces/default/pods', function(data){
// message
}, function(err){
// exit
}, [timeout])
kubectl.pod.list(function(err, pods){})
var label = { name: nginx }
kubectl.pod.list(label, function(err, pods){})
kubectl.pod.get('nginx', function(err, pod){})
// label selector
kubectl.pod.list({ app: 'nginx' }, function(err, pods){})
kubectl.pod.create('/:path/pods/nginx.yaml'), function(err, data){})
kubectl.pod.delete('nginx', function(err, data){})
kubectl.rc.list(function(err, pods){})
kubectl.rc.get('nginx', function(err, pod){})
kubectl.rc.create('/:path/pods/nginx.yaml'), function(err, data){})
kubectl.rc.delete('nginx', function(err, data){})
kubectl.rc.rollingUpdate('nginx', 'nginx:vserion', function(err, data){})
kubectl.rc.rollingUpdateByFile('nginx', '/:path/rc/nginx-v2.yaml', function(err, data){})
kubectl.rc.scale('nginx', 3, function(err, data){})
kubectl.service.list(function(err, pods){})
kubectl.service.get('nginx', function(err, pod){})
kubectl.service.create('/:path/service/nginx.yaml'), function(err, data){})
kubectl.service.delete('nginx', function(err, data){})
kubectl.node.list(function(err, pods){})
kubectl.node.get('nginx', function(err, pod){})
kubectl.node.create('/:path/nodes/node1.yaml'), function(err, data){})
kubectl.node.delete('nginx', function(err, data){})
FAQs
Node.js client library for Google's Kubernetes Kubectl And API
The npm package k8s receives a total of 474 weekly downloads. As such, k8s popularity was classified as not popular.
We found that k8s demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.