diff --git a/slides/k8s/access-eks-cluster.md b/slides/k8s/access-eks-cluster.md new file mode 100644 index 00000000..6bd0d845 --- /dev/null +++ b/slides/k8s/access-eks-cluster.md @@ -0,0 +1,104 @@ +## Accessing our EKS cluster + +- We also have a shared EKS cluster + +- With individual IAM users + +- Let's connect to this cluster! + +--- + +## What we need + +- `kubectl` (obviously!) + +- `aws` CLI (recent-ish version) + + (or `aws` CLI + `aws-iam-authenticator` plugin) + +- AWS API access key and secret access key + +- AWS region + +- EKS cluster name + +--- + +## Setting up AWS credentials + +- There are many ways to do this + +- We're going to use environment variables + +- You're welcome to use whatever you like (e.g. AWS profiles) + +.exercise[ + +- Set the AWS region, API access key, and secret key: + ```bash + export AWS_DEFAULT_REGION=`us-east-2` + export AWS_ACCESS_KEY_ID=`AKI...` + export AWS_SECRET_ACCESS_KEY=`xyz123...` + ``` + +- Check that the AWS API recognizes us: + ```bash + aws sts get-caller-identity + ``` + +] + +--- + +## Updating our kubeconfig file + +- Now we can use the AWS CLI to: + + - obtain the Kubernetes API address + + - register it in our kubeconfig file + +.exercise[ + +- Update our kubeconfig file: + ```bash + aws eks update-kubeconfig --name `fancy-clustername-1234` + ``` + +- Run some harmless command: + ```bash + kubectl version + ``` + +] + +--- + +## Our resources + +- We have the following permissions: + + - `view` in the `default` namespace + + - `edit` in the `container-training` namespace + + - `admin` in our personal namespace + +- Our personal namespace is our IAM user name + + (but with dots replaced with dashes) + +- For instance, user `ada.lovelace` has namespace `ada-lovelace` + +--- + +## Deploying things + +- Let's deploy DockerCoins in our personal namespace! + +- Expose the Web UI with a `LoadBalancer` service + +??? + +:EN:- Working with an EKS cluster +:FR:- Travailler avec un cluster EKS diff --git a/slides/kube-fullday.yml b/slides/kube-fullday.yml index 0f2877ae..c43169f4 100644 --- a/slides/kube-fullday.yml +++ b/slides/kube-fullday.yml @@ -68,6 +68,7 @@ content: #- k8s/authoring-yaml.md #- k8s/exercise-yaml.md #- k8s/localkubeconfig.md + #- k8s/access-eks-cluster.md #- k8s/accessinternal.md #- k8s/kubectlproxy.md - k8s/rollout.md diff --git a/slides/kube-halfday.yml b/slides/kube-halfday.yml index 2caae94c..3bd0e430 100644 --- a/slides/kube-halfday.yml +++ b/slides/kube-halfday.yml @@ -56,6 +56,7 @@ content: - k8s/buildshiprun-dockerhub.md - k8s/ourapponkube.md #- k8s/localkubeconfig.md + #- k8s/access-eks-cluster.md #- k8s/accessinternal.md #- k8s/kubectlproxy.md - - k8s/dashboard.md diff --git a/slides/kube-selfpaced.yml b/slides/kube-selfpaced.yml index 542998ef..aa533663 100644 --- a/slides/kube-selfpaced.yml +++ b/slides/kube-selfpaced.yml @@ -76,6 +76,7 @@ content: - - k8s/namespaces.md - k8s/localkubeconfig.md + #- k8s/access-eks-cluster.md - k8s/accessinternal.md - k8s/kubectlproxy.md - diff --git a/slides/kube-twodays.yml b/slides/kube-twodays.yml index 37e622f1..bb4272f9 100644 --- a/slides/kube-twodays.yml +++ b/slides/kube-twodays.yml @@ -69,6 +69,7 @@ content: #- k8s/exercise-yaml.md - - k8s/localkubeconfig.md + #- k8s/access-eks-cluster.md - k8s/accessinternal.md #- k8s/kubectlproxy.md - k8s/rollout.md