This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kubectl -n kube-system logs -f deployment/coredns --all-containers=true --since=5s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: coredns | |
| namespace: kube-system | |
| labels: | |
| k8s-app: kube-dns | |
| kubernetes.io/name: "CoreDNS" | |
| eks.amazonaws.com/component: coredns | |
| spec: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: ServiceAccount | |
| metadata: | |
| name: coredns | |
| namespace: kube-system | |
| labels: | |
| eks.amazonaws.com/component: coredns | |
| k8s-app: kube-dns | |
| --- | |
| apiVersion: rbac.authorization.k8s.io/v1beta1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if [[ "$OSTYPE" == "linux-gnu" ]]; then | |
| # ... | |
| elif [[ "$OSTYPE" == "darwin"* ]]; then | |
| # Mac OSX | |
| elif [[ "$OSTYPE" == "cygwin" ]]; then | |
| # POSIX compatibility layer and Linux environment emulation for Windows | |
| elif [[ "$OSTYPE" == "msys" ]]; then | |
| # Lightweight shell and GNU utilities compiled for Windows (part of MinGW) | |
| elif [[ "$OSTYPE" == "win32" ]]; then | |
| # I'm not sure this can happen. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <powershell> | |
| C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\InitializeInstance.ps1 -Schedule | |
| netsh interface portproxy delete v4tov4 80 169.254.170.2 | out-null | |
| [Environment]::SetEnvironmentVariable('ECS_DISABLE_METRICS', 'false', 'Machine') | |
| [Environment]::SetEnvironmentVariable('ECS_ENABLE_AWSLOGS_EXECUTIONROLE_OVERRIDE', $TRUE, 'Machine') | |
| Initialize-ECSAgent -Cluster Windows -EnableTaskIAMRole -LoggingDrivers '["json-file","awslogs"]' | |
| </powershell> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
| choco install awscli -y | |
| $env:Path += ";C:\Program Files\Amazon\AWSCLI\bin" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ec2ssh() | |
| { | |
| if [[ ! -z "$1" ]]; then | |
| # echo "cfn" | |
| INSTANCE_ID_INPUT=$1 | |
| else | |
| echo -n "Enter Instance ID: " | |
| read INSTANCE_ID_INPUT | |
| fi | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| file that has been created by eksctl | |
| ``` | |
| # /etc/systemd/system/kubelet.service | |
| # eksctl-specific systemd drop-in unit for kubelet, for Amazon Linux 2 (AL2) | |
| [Service] | |
| # Local metadata parameters: REGION, AWS_DEFAULT_REGION | |
| EnvironmentFile=/etc/eksctl/metadata.env | |
| # Global and static parameters: CLUSTER_DNS, NODE_LABELS, NODE_TAINTS | |
| EnvironmentFile=/etc/eksctl/kubelet.env |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=Kubernetes Kubelet | |
| Documentation=https://github.com/kubernetes/kubernetes | |
| After=docker.service | |
| Requires=docker.service | |
| [Service] | |
| ExecStartPre=/sbin/iptables -P FORWARD ACCEPT | |
| ExecStart=/usr/bin/kubelet --cloud-provider aws \ | |
| --config /etc/kubernetes/kubelet/kubelet-config.json \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "kind": "KubeletConfiguration", | |
| "apiVersion": "kubelet.config.k8s.io/v1beta1", | |
| "syncFrequency": "1m0s", | |
| "fileCheckFrequency": "20s", | |
| "httpCheckFrequency": "20s", | |
| "address": "0.0.0.0", | |
| "port": 10250, | |
| "tlsCertFile": "/root/cdk/server.crt", | |
| "tlsPrivateKeyFile": "/root/cdk/server.key", |