See how to retrieve cluster.rkestate from controlplane node here:
https://gist.github.com/tuxmonteiro/803cf4d4cd39e79d938c0a05b9b677bb
cat cluster.rkestate | jq -r '.currentState.certificatesBundle."kube-admin".config' > kube-admin-kubeconfig.yml
| package com.example; | |
| import static java.util.Collections.*; | |
| import java.util.Collection; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import java.util.Set; | |
| import java.util.concurrent.TimeUnit; |
| ##TCP FLAGS## | |
| Unskilled Attackers Pester Real Security Folks | |
| ============================================== | |
| TCPDUMP FLAGS | |
| Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere) | |
| Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere) | |
| Pester = PSH = [P] (Push Data) | |
| Real = RST = [R] (Reset Connection) | |
| Security = SYN = [S] (Start Connection) |
| # Create a folder for our new root structure | |
| $ export centos_root='/centos_image/rootfs' | |
| $ mkdir -p $centos_root | |
| # initialize rpm database | |
| $ rpm --root $centos_root --initdb | |
| # download and install the centos-release package, it contains our repository sources | |
| $ yum reinstall --downloadonly --downloaddir . centos-release | |
| $ rpm --root $centos_root -ivh centos-release*.rpm | |
| $ rpm --root $centos_root --import $centos_root/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 | |
| # install yum without docs and install only the english language files during the process |
See how to retrieve cluster.rkestate from controlplane node here:
https://gist.github.com/tuxmonteiro/803cf4d4cd39e79d938c0a05b9b677bb
cat cluster.rkestate | jq -r '.currentState.certificatesBundle."kube-admin".config' > kube-admin-kubeconfig.yml
| upstream docker-mirror-upstream { | |
| server upstream.example.com; | |
| } | |
| proxy_cache_path /var/lib/docker-mirror/cache levels=1:2 max_size=10g inactive=48h keys_zone=cache:10m; | |
| server { | |
| listen 80 default_server; | |
| listen 443 ssl default_server; |
Run on controlplane node, uses any found hyperkube image
docker run --rm --net=host -v $(docker inspect kubelet --format '{{ range .Mounts }}{{ if eq .Destination "/etc/kubernetes" }}{{ .Source }}{{ end }}{{ end }}')/ssl:/etc/kubernetes/ssl:ro --entrypoint bash $(docker inspect $(docker images -q --filter=label=org.label-schema.vcs-url=https://github.com/rancher/hyperkube.git) --format='{{index .RepoTags 0}}' | tail -1) -c 'kubectl --kubeconfig /etc/kubernetes/ssl/kubecfg-kube-node.yaml -n kube-system get configmap full-cluster-state -o json | jq -r .data.\"full-cluster-state\" | jq -r .' > cluster.rkestate
| #!/bin/bash | |
| bucket=$1 | |
| set -e | |
| echo "Removing all versions from $bucket" | |
| versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'` | |
| markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'` |
| kubectl get nodes --sort-by=".status.conditions[?(@.reason == 'KubeletReady' )].lastTransitionTime" |
| #!/bin/bash | |
| echo "########### Setting region as env variable ##########" | |
| export AWS_REGION=sa-east-1 | |
| echo "########### Setting up localstack profile ###########" | |
| aws configure set aws_access_key_id access_key --profile=localstack | |
| aws configure set aws_secret_access_key secret_key --profile=localstack | |
| aws configure set region $AWS_REGION --profile=localstack | |
| echo "########### Setting default profile ###########" |
| package com.maoudia; | |
| import jakarta.validation.constraints.NotBlank; | |
| import jakarta.validation.constraints.NotNull; | |
| import jakarta.validation.constraints.Positive; | |
| import org.springframework.boot.context.properties.ConfigurationProperties; | |
| import org.springframework.boot.context.properties.bind.DefaultValue; | |
| import org.springframework.validation.annotation.Validated; | |
| import java.net.URI; |