kubernetes-the-hard-way-terraform | Terraform-defined implementation | Infrastructure Automation library
kandi X-RAY | kubernetes-the-hard-way-terraform Summary
kandi X-RAY | kubernetes-the-hard-way-terraform Summary
Terraform-defined implementation of Kelsey Hightower's "Kubernetes The Hard Way" tutorial.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of kubernetes-the-hard-way-terraform
kubernetes-the-hard-way-terraform Key Features
kubernetes-the-hard-way-terraform Examples and Code Snippets
Community Discussions
Trending Discussions on kubernetes-the-hard-way-terraform
QUESTION
I'm attempting to deploy k8s "the hard way" using a terraform deployment. Please find the repo here: https://github.com/aidanSoles/kubernetes-the-hard-way-terraform
It was written using Terraform 0.11 so I elected not to upgrade the code to 0.12.
The deployment creates Google Cloud Platform virtual machines and attempts to run scripts on them.
The error message I get when applying the configuration is:
...ANSWER
Answered 2019-Dec-02 at 14:09Regarding the documentation:
I have followed that guide and confirm that it's working.
I have attempted that with terraform-0.11.14 . It appeared that the config files aren't compatible with terraform 0.12 at the moment.
Regarding the error:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install kubernetes-the-hard-way-terraform
Download the gcloud command-line tool.
Create a project in GCP named k8s-the-hard-way-tf.
On the command line, run: gcloud init to set up your account credentials/project details to point at the newly created project.
Create a service account (IAM & admin > Service accounts > + CREATE SERVICE ACCOUNT) in the k8s-the-hard-way-tf project with Owner permissions, create/download the *.json credentials generated by the service account, and place them in a safe location on your local machine.
Set your Google Application credentials using: export GOOGLE_APPLICATION_CREDENTIALS=<path-to-your-credentials-json>.
Go to the certs directory, and run the create-ca.sh script, followed by the gen-certs.sh script. This will create a self-signed CA, and create/sign all of the generated certs with that CA.
Go to the configs directory, and run the gen-config.sh script. This will create the encryption configuration for the new Kubernetes cluster.
Add a public ssh key to your project metadata (Compute Engine > Metadata > SSH Keys) using the format <protocol> <key-blob> <username@example.com>. The virtual machines you spin up will inherit this public key and allow the remote-exec provisioners to work.
Fill in the variables in variables.tf that have TODO next to them.
OPTIONAL: Edit the GitHub usernames in scripts/add-ssh-keys.sh to give trusted colleagues/friends access to the machines in your Kubernetes cluster (see the Motivation section for more details).
Run: terraform init to initialize Terraform.
Run: terraform plan to see the planned changes that Terraform will make.
Run: terraform apply to create your Kubernetes cluster. NOTE: The first terraform apply might fail because the Compute Engine API has not been used in project before. Follow the link provided in the error message (should be something like https://console.developers.google.com/apis/api/compute.googleapis.com/overview?project=0123456789) and click ENABLE. After the API is enabled, rerun terraform apply.
Configure kubectl to use the new cluster by running the configure-kubectl script.
Run kubectl get cs (or another related command) to test the cluster's component statuses.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page