Skip to content

Instantly share code, notes, and snippets.


Tiexin Guo IronCore864

View GitHub Profile

Cloud Native Computing Foundation

A project of The Linux Foundation

Individual Contributor License Agreement ("Agreement") v1.0

Thank you for your interest in the Cloud Native Computing Foundation project (“CNCF”) of The Linux Foundation (the "Foundation"). In order to clarify the intellectual property license granted with Contributions from any person or entity, the Foundation must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of CNCF, the Foundation and its users; it does not change your rights to use your own Contributions for any other purpose.

IronCore864 / main.go
Last active Dec 7, 2021
Go Resty with GitHub Releases
View main.go
package main
import (
resty ""
IronCore864 / Dockerfile
Created Aug 1, 2021
Dockerfile Example
View Dockerfile
FROM golang:alpine
COPY . .
RUN apk add git
RUN go get ./... && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o app
View gist:783ad7ae25fa799e0c993caa472a9008
I0803 10:03:13.689964 1 static_autoscaler.go:147] Starting main loop
I0803 10:03:13.780154 1 auto_scaling_groups.go:354] Regenerating instance to ASG map for ASGs: [eks-1cb9d9ce-32fe-2f15-35db-3a088d186141]
I0803 10:03:13.842713 1 aws_manager.go:263] Refreshed ASG list, next refresh after 2020-08-03 10:04:13.842705977 +0000 UTC m=+561.584674568
I0803 10:03:13.842938 1 utils.go:626] No pod using affinity / antiaffinity found in cluster, disabling affinity predicate for this loop
I0803 10:03:13.842955 1 static_autoscaler.go:303] Filtering out schedulables
I0803 10:03:13.843012 1 static_autoscaler.go:320] No schedulable pods
I0803 10:03:13.843034 1 static_autoscaler.go:328] No unschedulable pods
I0803 10:03:13.843047 1 static_autoscaler.go:375] Calculating unneeded nodes
I0803 10:03:13.843106 1 scale_down.go:379] Scale-down calculation: ignoring 2 nodes unremovable in the last 5m0s
I0803 10:03:13.843120 1 scale_down.go:410] Node
View gist:912c01c101a923b0ceb093d3914aefb3
"Version": "2012-10-17",
"Statement": [
"Action": [
View gist:0d30b77fc8f86b158e58b47149a3624c
apiVersion: apps/v1
kind: Deployment
name: test
namespace: default
app: nginx
replicas: 4
tiexin@Tiexins-MacBook-Pro ~ $ eksctl create cluster -n test --managed
[ℹ] eksctl version 0.24.0
[ℹ] using region eu-central-1
[ℹ] setting availability zones to [eu-central-1c eu-central-1b eu-central-1a]
[ℹ] subnets for eu-central-1c - public: private:
[ℹ] subnets for eu-central-1b - public: private:
[ℹ] subnets for eu-central-1a - public: private:
[ℹ] using Kubernetes version 1.16
[ℹ] creating EKS cluster "test" in "eu-central-1" region with managed nodes
[ℹ] will create 2 separate CloudFormation stacks for cluster itself and the initial managed nodegroup
View gist:3b6d60a6911144415c15ee7f26f05322
apiVersion: v1
kind: Pod
name: test
- name: test
# run as user 1000
View gist:3d86cb63f9850656c0bfa8254dcb669f
apiVersion: v1
kind: Pod
name: test
- name: test
# run as user 0
View gist:c599a34c8556cbfd0c874a9cccf54947
kind: Role
name: eks:podsecuritypolicy:privileged
namespace: kube-system
labels: "true" pod-security-policy