Let's look at some basic kubectl output options.
Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).
We can start with:
kubectl get no
| const core = require('@actions/core'); | |
| const github = require('@actions/github'); | |
| async function run() { | |
| try { | |
| const accessToken = core.getInput('access-token'); | |
| const message = core.getInput('message'); | |
| const payload = github.context.payload; | |
| const githubClient = github.getOctokit(accessToken); |
| /* | |
| Serve is a very simple static file server in go | |
| Usage: | |
| -p="8100": port to serve on | |
| -d=".": the directory of static files to host | |
| Navigating to http://localhost:8100 will display the index.html or directory | |
| listing file. | |
| */ | |
| package main |
| kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod |
| # non root user example for alpine | |
| # | |
| # usage: | |
| # $ docker build --build-arg "USER=someuser" --tag test . | |
| # $ docker run --rm test | |
| FROM alpine | |
| ARG USER=default | |
| ENV HOME /home/$USER |
| #!/bin/bash | |
| USAGE="Attach to Docker Container | |
| -------------------------- | |
| Attach to Docker Container even if the container does not run | |
| ssh daemon. This is accomplished by using linux containers | |
| directly via 'nsenter' (see http://bit.ly/docker_nsenter). | |
| To install 'nsenter', just execute: | |
| $ docker run -v /usr/local/bin:/target jpetazzo/nsenter |
| version: "3.7" | |
| services: | |
| envoy: | |
| build: ./compose/envoy | |
| ports: | |
| - "8080:80" | |
| volumes: | |
| - ./envoy.yaml:/config/envoy.yaml | |
| environment: | |
| - DEBUG_LEVEL=info |
| name: hello-world | |
| on: push | |
| jobs: | |
| my-job: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: my-step | |
| run: echo "Hello World!" |
| name: issue-greeter | |
| on: | |
| issues: | |
| types: [opened] | |
| jobs: | |
| my-job: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: my-step | |
| env: |
| // License: MIT Open Source | |
| // Copyright (c) Joe Linoff 2016 | |
| // Go code to prompt for password using only standard packages by utilizing syscall.ForkExec() and syscall.Wait4(). | |
| // Correctly resets terminal echo after ^C interrupts. | |
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "os" |