Skip to content

Instantly share code, notes, and snippets.

@Misterhex
Misterhex / envoyconf.yaml
Created March 16, 2019 00:34
envoy proxy protocol upstream example
admin:
access_log_path: /tmp/admin_access.log
address:
socket_address:
protocol: TCP
address: 0.0.0.0
port_value: 9901
static_resources:
listeners:
- name: tcp_listener
@Misterhex
Misterhex / bundle.yaml
Created June 11, 2018 00:26
tail kubernetes events from metricbeat and fluentbit sidecar
---
apiVersion: v1
kind: ConfigMap
metadata:
name: metricbeat-config
namespace: beats
labels:
k8s-app: metricbeat
kubernetes.io/cluster-service: "true"
data:
@Misterhex
Misterhex / gist:26a87f47c3d09cedd009c8df4606cee5
Last active May 7, 2018 14:38
StopPodSandbox "c961845a87f53f72f8212f92cd2f0306ac4906216216452df693e5b0d7d21405" from runtime service failed: rpc error: code = 2 desc = NetworkPlugin cni failed to teardown pod "xxx" network: could not retrieve port mappings: checkpoint is not found.
https://github.com/kubernetes/kubernetes/blob/release-1.7/pkg/kubelet/kubelet.go#L282
https://github.com/kubernetes/kubernetes/blob/release-1.7/pkg/kubelet/remote/remote_runtime.go#L29
https://github.com/kubernetes/kubernetes/blob/release-1.7/pkg/kubelet/remote/remote_runtime.go#L41
https://github.com/kubernetes/kubernetes/blob/release-1.7/pkg/kubelet/remote/remote_runtime.go#L55
https://github.com/kubernetes/kubernetes/blob/release-1.7/pkg/kubelet/remote/remote_runtime.go#L114
https://github.com/kubernetes/kubernetes/blob/release-1.7/pkg/kubelet/apis/cri/v1alpha1/runtime/api.pb.go#L3299
https://github.com/kubernetes/kubernetes/blob/release-1.7/pkg/kubelet/apis/cri/v1alpha1/runtime/api.pb.go#L3389
[root@8d6488cbea36 /]# ./kubelet --help
The kubelet is the primary "node agent" that runs on each
node. The kubelet works in terms of a PodSpec. A PodSpec is a YAML or JSON object
that describes a pod. The kubelet takes a set of PodSpecs that are provided through
various mechanisms (primarily through the apiserver) and ensures that the containers
described in those PodSpecs are running and healthy. The kubelet doesn't manage
containers which were not created by Kubernetes.
Other than from an PodSpec from the apiserver, there are three ways that a container
manifest can be provided to the Kubelet.
@Misterhex
Misterhex / kubelet v1.7
Last active May 8, 2018 01:16
kubelet v1.7
[root@8d6488cbea36 /]# ./kubelet --help
Usage of ./kubelet:
--address ip The IP address for the Kubelet to serve on (set to 0.0.0.0 for all interfaces) (default 0.0.0.0)
--allow-privileged If true, allow containers to request privileged mode.
--alsologtostderr log to standard error as well as files
--anonymous-auth Enables anonymous requests to the Kubelet server. Requests that are not rejected by another authentication method are treated as anonymous requests. Anonymous requests have a username of system:anonymous, and a group name of system:unauthenticated. (default true)
--application-metrics-count-limit int Max number of application metrics to store (per container) (default 100)
--authentication-token-webhook Use the TokenReview API to determine authentication f
@Misterhex
Misterhex / stack
Created May 7, 2018 10:06
checkpointhandler
https://github.com/kubernetes/kubernetes/blob/release-1.7/cmd/kubelet/app/options/container_runtime.go#L42
https://github.com/kubernetes/kubernetes/blob/release-1.7/cmd/kubelet/app/options/container_runtime.go#L109
https://github.com/kubernetes/kubernetes/blob/release-1.7/pkg/kubelet/kubelet.go#L56
https://github.com/kubernetes/kubernetes/blob/release-1.7/pkg/kubelet/kubelet.go#L295
https://github.com/kubernetes/kubernetes/blob/release-1.7/pkg/kubelet/kubelet.go#L581
https://github.com/kubernetes/kubernetes/blob/release-1.7/pkg/kubelet/dockershim/docker_service.go#L152
https://github.com/kubernetes/kubernetes/blob/release-1.7/pkg/kubelet/dockershim/docker_service.go#L177
https://github.com/kubernetes/kubernetes/blob/release-1.7/pkg/kubelet/dockershim/docker_checkpoint.go#L87
https://github.com/kubernetes/kubernetes/blob/release-1.7/pkg/kubelet/dockershim/checkpoint_store.go#L61
@Misterhex
Misterhex / README.md
Created December 21, 2017 08:59 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


@Misterhex
Misterhex / disable_ie_security.ps1
Created December 11, 2017 08:40
disable ie security to allow internet explorer driver to run
function Disable-InternetExplorerESC {
$AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"
$UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}"
Rundll32 iesetup.dll, IEHardenLMSettings, 1, True
Rundll32 iesetup.dll, IEHardenUser, 1, True
Rundll32 iesetup.dll, IEHardenAdmin, 1, True
Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 0 -Force
Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0 -Force
Stop-Process -Name Explorer -Force
Write-Host "IE Enhanced Security Configuration (ESC) has been disabled." -ForegroundColor Green
#!/usr/bin/env node
const cucumberJsonFolder = process.argv[2];
const outDir = process.argv[3];
const fs = require('fs');
if (!fs.existsSync(outDir)) {
fs.mkdirSync(outDir);
}