Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Conversation

@MattiasGees
Copy link
Member

@MattiasGees MattiasGees commented Jun 8, 2018

What this PR does / why we need it:
Docs on how to add kube2iam to our Tarmak setup

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #290

Special notes for your reviewer:
We also need #293 merged for checks to clear

Release note:

NONE

@jetstack-bot jetstack-bot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 8, 2018
@jetstack-bot jetstack-bot requested a review from JoshVanL June 8, 2018 09:30
@MattiasGees
Copy link
Member Author

/retest

@MattiasGees
Copy link
Member Author

/assign @dippynark

@MattiasGees MattiasGees changed the title Start of kube2iam docs Kube2iam docs Jun 14, 2018
@jetstack-bot jetstack-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 15, 2018
@jetstack-bot jetstack-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 15, 2018
Prerequisite
~~~~~~~~~~~~

Make sure `HELM <https://www.helm.sh/>`_ is `activated <https://docs.tarmak.io/user-guide.html#tiller>` on the Tarmak cluster.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link isn't displaying properly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly refer to the tarmak docs for installing tiller into the cluster too rather than suggesting using helm init

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dippynark link is fixed and it was already linked to the docs of tarmak to setup helm.


.. code-block:: bash

helm version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how can I connect to tarmak using helm? The process of retrieving a kubeconfig is not clear here - I had to hack the kubeconfig generated by tarmak kubectl get nodes and exposed the LB publically

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that will be part of #279. I will make sure to add an reference in these docs once that will be done.


.. code-block:: bash

helm upgrade kube2iam stable/kube2iam \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This chart doesn't exist yet?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

variable "instance_iam_role_arn" {
description = "ARN of the instance IAM role
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ terraform init
There are some problems with the configuration, described below.

The Terraform configuration must be valid before initialization so that
Terraform can determine which modules and providers need to be installed.

Error: Error parsing /Users/luke/Desktop/nginx/test.tf: At 19:48: literal not terminated

.. code-block:: bash

terraform init
terraform apply -var cluster_name=example -var region=eu-west-1 -var instance_arn=arn:aws:iam::xxxxxxx:role/my-instance-role
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ terraform apply -var cluster_name=cluster -var region=eu-west-1 -var instance_arn=arn:aws:iam::015774327972:policy/kube2iam_assumeRole_policy_cluster
var.instance_iam_role_arn
  ARN of the instance IAM role

  Enter a value:

"Action": "sts:AssumeRole",
"Principal": {
"AWS": [
"${instance_iam_role_arn}"
Copy link
Contributor

@dippynark dippynark Jun 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var.instance_iam_role_arn?

EOF
}

resource "aws_iam_role_policy" "test_role_policy" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ terraform apply -var cluster_name=cluster -var region=eu-west-1 -var instance_iam_role_arn=arn:aws:iam::015774327972:policy/kube2iam_assumeRole_policy_cluster

Error: aws_iam_role_policy.test_role_policy: "policy" contains an invalid JSON policy

@MattiasGees
Copy link
Member Author

@dippynark I addressed all comments.

@dippynark
Copy link
Contributor

/lgtm

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 21, 2018
@MattiasGees
Copy link
Member Author

Thx @dippynark for getting through this PR with me. I know this was a painfull process :)

@jetstack-bot jetstack-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 27, 2018
@dippynark
Copy link
Contributor

/unassign

@jetstack-bot jetstack-bot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 28, 2018
@MattiasGees
Copy link
Member Author

Fixed merge conflicts
/unassign
/assign @dippynark

@charlieegan3
Copy link
Contributor

I've taken a read over this. I've not tried it all out but it makes sense to me.

/lgtm

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 3, 2018
@charlieegan3
Copy link
Contributor

/assign @simonswine

@charlieegan3
Copy link
Contributor

/unassign

@simonswine
Copy link
Contributor

/approve

@jetstack-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: simonswine

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create example how to use kube2iam with tarmak

5 participants