Skip to content

Instantly share code, notes, and snippets.

@jdluther2020
jdluther2020 / EKS-permission-fix-to-view-k8s-resources.sh
Last active February 29, 2024 07:17
Assign required permissions to IAM principals to view Kubernetes Resources
#
# Assign required permissions to IAM principals to view Kubernetes Resources
# Ref: https://docs.aws.amazon.com/eks/latest/userguide/view-kubernetes-resources.html
#
# Addressed as part of Troubleshooting IAM
# Ref: https://docs.aws.amazon.com/eks/latest/userguide/security_iam_troubleshoot.html#security-iam-troubleshoot-cannot-view-nodes-or-workloads
#
# JDL- I got the following error on top of the EKS Console while trying to see Pod under Resources tab
#
@jdluther2020
jdluther2020 / eks-workshop-cluster.sh
Last active March 5, 2024 08:10
Amazon EKS Cluster with eksctl
#
# STEP 1: Create Cloud9 IDE on CloudShell
#
# Ref: https://www.eksworkshop.com/docs/introduction/setup/your-account
# Open cloudshell on browser tab
# URL: https://console.aws.amazon.com/cloudshell/home
# Make sure to stay in the right region as appropriate (mine is us-east-1)
# Fire the Cloud9 IDE creation cloudformation command
@jdluther2020
jdluther2020 / emptydir-sizelimit.sh
Last active April 14, 2023 09:26
Mastering Kubernetes One Task at a Time - Ephemeral Storage Volumes with 'emptyDir'-Size limit of emptyDir volume
#!/usr/bin/bash
# Purpose: Mastering Kubernetes One Task at a Time - Ephemeral Storage Volumes with 'emptyDir'-Shared emptyDir in a Pod
# Blog Ref: https://medium.com/the-aws-way/mastering-kubernetes-one-task-at-a-time-ephemeral-storage-volumes-with-emptydir-6cb08546b0ff
# GitHub Ref: https://github.com/jdluther2020/jdluther-kubernetes-io-tasks/
# Author's NOTE
# 1. # are comment lines
# 2. Command output wherever helpful is shown inside {}
# 3. Everything is executed on a local dev environment (MacOS)
@jdluther2020
jdluther2020 / emptydir-memory.sh
Last active April 14, 2023 09:26
Mastering Kubernetes One Task at a Time - Ephemeral Storage Volumes with 'emptyDir'-Memory or RAM-backed emptyDir volume
#!/usr/bin/bash
# Purpose: Mastering Kubernetes One Task at a Time - Ephemeral Storage Volumes with 'emptyDir'-Memory or RAM-backed emptyDir volume
# Blog Ref: https://medium.com/the-aws-way/mastering-kubernetes-one-task-at-a-time-ephemeral-storage-volumes-with-emptydir-6cb08546b0ff
# GitHub Ref: https://github.com/jdluther2020/jdluther-kubernetes-io-tasks/
# Author's NOTE
# 1. # are comment lines
# 2. Command output wherever helpful is shown inside {}
# 3. Everything is executed on a local dev environment (MacOS)
@jdluther2020
jdluther2020 / emptydir-shared-pod.sh
Last active April 14, 2023 09:26
Mastering Kubernetes One Task at a Time - Ephemeral Storage Volumes with 'emptyDir'-Shared emptyDir volume in a Pod
#!/usr/bin/bash
# Purpose: Mastering Kubernetes One Task at a Time - Ephemeral Storage Volumes with 'emptyDir'-Shared emptyDir Volume in a Pod
# Blog Ref: https://medium.com/the-aws-way/mastering-kubernetes-one-task-at-a-time-ephemeral-storage-volumes-with-emptydir-6cb08546b0ff
# GitHub Ref: https://github.com/jdluther2020/jdluther-kubernetes-io-tasks/
# Author's NOTE
# 1. # are comment lines
# 2. Command output wherever helpful is shown inside {}
# 3. Everything is executed on a local dev environment (MacOS)
@jdluther2020
jdluther2020 / sharing-volumes-multi-containers.sh
Last active April 10, 2023 21:42
Mastering Kubernetes One Task at a Time - Persistent Storage Volumes with 'hostPath'-Sharing Volumes among Multiple Containers
#!/usr/bin/bash
# Purpose: Persistent Storage Volumes with 'hostPath'-Sharing Volumes among Multiple Containers
# Blog Ref: https://medium.com/the-aws-way/mastering-kubernetes-one-task-at-a-time-persistent-storage-volumes-with-hostpath-ad645714bcc7
# GitHub Ref: https://github.com/jdluther2020/jdluther-kubernetes-io-tasks/
# Author's NOTE
# 1. # are comment lines
# 2. Command output wherever helpful is shown inside {}
# 3. Everything is executed on a local dev environment (MacOS)
@jdluther2020
jdluther2020 / multi-volumes-volume-mounts.sh
Last active April 10, 2023 21:42
Mastering Kubernetes One Task at a Time - Persistent Storage Volumes with 'hostPath'-Using Multiple Volumes and volumemounts in a Pod
#!/usr/bin/bash
# Purpose: Persistent Storage Volumes with 'hostPath'-Using Multiple Volumes and volumemounts in a Pod
# Blog Ref: https://medium.com/the-aws-way/mastering-kubernetes-one-task-at-a-time-persistent-storage-volumes-with-hostpath-ad645714bcc7
# GitHub Ref: https://github.com/jdluther2020/jdluther-kubernetes-io-tasks/
# Author's NOTE
# 1. # are comment lines
# 2. Command output wherever helpful is shown inside {}
# 3. Everything is executed on a local dev environment (MacOS)
@jdluther2020
jdluther2020 / create-hostpat-volumes.sh
Last active April 10, 2023 21:43
Mastering Kubernetes One Task at a Time - Persistent Storage Volumes with 'hostPath'-Creating Persistent Volumes on Cluster Node Filesystem
#!/usr/bin/bash
# Purpose: Persistent Storage Volumes with 'hostPath'-Creating Persistent Volumes on Cluster Node Filesystem
# Blog Ref: https://medium.com/the-aws-way/mastering-kubernetes-one-task-at-a-time-persistent-storage-volumes-with-hostpath-ad645714bcc7
# GitHub Ref: https://github.com/jdluther2020/jdluther-kubernetes-io-tasks/
# Author's NOTE
# 1. # are comment lines
# 2. Command output wherever helpful is shown inside {}
# 3. Everything is executed on a local dev environment (MacOS)
@jdluther2020
jdluther2020 / schedule-on-all-nodes.sh
Last active April 10, 2023 06:25
Mastering Kubernetes One Task at a Time - Know Thy Nodes!—Objective 6 - Schedule Pods on all Nodes (Worker + Control Plane)
#!/usr/bin/bash
# Purpose: Mastering Kubernetes One Task at a Time - Know Thy Nodes!—Objective 6 - Schedule Pods on all Nodes (Worker + Control Plane)
# Blog Ref: https://medium.com/the-aws-way/the-aws-way-mastering-kubernetes-one-task-at-a-time-know-thy-nodes-e3ad157ac2db
# GitHub Ref: https://github.com/jdluther2020/jdluther-kubernetes-io-tasks/
# Author's NOTE
# 1. # are comment lines
# 2. Command output wherever helpful is shown inside {}
# 3. Everything is executed on a local dev environment (MacOS)
@jdluther2020
jdluther2020 / schedule-on-a-specific-node.sh
Last active April 10, 2023 06:28
Mastering Kubernetes One Task at a Time - Know Thy Nodes!—Objective 5 - Schedule Pods on a Specific Node
#!/usr/bin/bash
# Purpose: Mastering Kubernetes One Task at a Time - Know Thy Nodes!—Objective 5 - Schedule Pods on a Specific Node
# Blog Ref: https://medium.com/the-aws-way/the-aws-way-mastering-kubernetes-one-task-at-a-time-know-thy-nodes-e3ad157ac2db
# GitHub Ref: https://github.com/jdluther2020/jdluther-kubernetes-io-tasks/
# Author's NOTE
# 1. # are comment lines
# 2. Command output wherever helpful is shown inside {}
# 3. Everything is executed on a local dev environment (MacOS)