DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Implementing EKS Multi-Tenancy Using Capsule (Part 3)
  • Establishing a Highly Available Kubernetes Cluster on AWS With Kops
  • Automate Cluster Autoscaler in EKS
  • Creating an AWS EKS Cluster and Providing Access to Developer

Trending

  • Intro to RAG: Foundations of Retrieval Augmented Generation, Part 1
  • The Ultimate Guide to Code Formatting: Prettier vs ESLint vs Biome
  • Agentic AI Systems: Smarter Automation With LangChain and LangGraph
  • Proactive Security in Distributed Systems: A Developer’s Approach
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Creating a Gossip-Based Kubernetes Cluster on AWS

Creating a Gossip-Based Kubernetes Cluster on AWS

The latest version of Kops promises a DNS-free way of setting up Kubernetes clusters, using a gossip-based approach to discover nodes.

By 
Arun Gupta user avatar
Arun Gupta
·
Jun. 28, 17 · Tutorial
Likes (5)
Comment
Save
Tweet
Share
10.5K Views

Join the DZone community and get the full member experience.

Join For Free

Creating a Kubernetes cluster using Kops requires a top-level domain or a subdomain and setting up Route 53-hosted zones. This domain allows the worker nodes to discover the master and the master to discover all the etcd servers. This is also needed for kubectl to be able to talk directly with the master. This worked well, but poses an additional hassle for the developers.

Kubernetes Logo

Kops 1.6.2 adds an experimental support for gossip-based discovery of nodes. This makes the process of setting up Kubernetes cluster using Kops DNS-free, and much more simplified.

Let’s take a look!

Install or upgrade kops:

brew upgrade kops


Check the version:

~ $ kops version
Version 1.6.2


Create an S3 bucket as “state store”:

~ $ kops version
Version 1.6.2


Create a Kubernetes cluster:

kops create cluster cluster.k8s.local --zones us-east-1a --yes


It shows the output as:

I0622 16:52:07.494558   83656 create_cluster.go:655] Inferred --cloud=aws from zone "us-east-1a"
I0622 16:52:07.495012   83656 create_cluster.go:841] Using SSH public key: /Users/argu/.ssh/id_rsa.pub
I0622 16:52:08.540445   83656 subnets.go:183] Assigned CIDR 172.20.32.0/19 to subnet us-east-1a
I0622 16:52:16.327523   83656 apply_cluster.go:396] Gossip DNS: skipping DNS validation
I0622 16:52:25.539755   83656 executor.go:91] Tasks: 0 done / 67 total; 32 can run
I0622 16:52:29.843320   83656 vfs_castore.go:422] Issuing new certificate: "kubecfg"
I0622 16:52:30.108046   83656 vfs_castore.go:422] Issuing new certificate: "kubelet"
I0622 16:52:30.139629   83656 vfs_castore.go:422] Issuing new certificate: "kube-scheduler"
I0622 16:52:31.072229   83656 vfs_castore.go:422] Issuing new certificate: "kube-proxy"
I0622 16:52:31.082560   83656 vfs_castore.go:422] Issuing new certificate: "kube-controller-manager"
I0622 16:52:31.579158   83656 vfs_castore.go:422] Issuing new certificate: "kops"
I0622 16:52:32.742807   83656 executor.go:91] Tasks: 32 done / 67 total; 13 can run
I0622 16:52:43.057189   83656 executor.go:91] Tasks: 45 done / 67 total; 18 can run
I0622 16:52:50.047375   83656 executor.go:91] Tasks: 63 done / 67 total; 3 can run
I0622 16:53:02.047610   83656 vfs_castore.go:422] Issuing new certificate: "master"
I0622 16:53:03.027007   83656 executor.go:91] Tasks: 66 done / 67 total; 1 can run
I0622 16:53:04.197637   83656 executor.go:91] Tasks: 67 done / 67 total; 0 can run
I0622 16:53:04.884362   83656 update_cluster.go:229] Exporting kubecfg for cluster
Kops has set your kubectl context to cluster.k8s.local

Cluster is starting.  It should be ready in a few minutes.

Suggestions:
 * validate cluster: kops validate cluster
 * list nodes: kubectl get nodes --show-labels
 * ssh to the master: ssh -i ~/.ssh/id_rsa admin@api.cluster.k8s.local
The admin user is specific to Debian. If not using Debian please use the appropriate user based on your OS.
 * read about installing addons: https://github.com/kubernetes/kops/blob/master/docs/addons.md


Wait for a few minutes for the cluster to be created.

Then, validate the cluster:

~ $ kops validate cluster
Using cluster from kubectl context: cluster.k8s.local

Validating cluster cluster.k8s.local

INSTANCE GROUPS
NAME			ROLE	MACHINETYPE	MIN	MAX	SUBNETS
master-us-east-1a	Master	m3.medium	1	1	us-east-1a
nodes			Node	t2.medium	2	2	us-east-1a

NODE STATUS
NAME				ROLE	READY
ip-172-20-36-52.ec2.internal	node	True
ip-172-20-38-117.ec2.internal	master	True
ip-172-20-49-179.ec2.internal	node	True

Your cluster cluster.k8s.local is ready


Get the list of nodes using kubectl:

~ $ kubectl get nodes
NAME                            STATUS         AGE       VERSION
ip-172-20-36-52.ec2.internal    Ready,node     4h        v1.6.2
ip-172-20-38-117.ec2.internal   Ready,master   4h        v1.6.2
ip-172-20-49-179.ec2.internal   Ready,node     4h        v1.6.2


Deleting a cluster is pretty straight forward as well:

kops delete cluster cluster.k8s.local --yes


That’s it!

Here, you can find several examples of getting started with Kubernetes.

File issues at github.com/kubernetes/kops/issues.

Kubernetes cluster AWS

Published at DZone with permission of Arun Gupta, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Implementing EKS Multi-Tenancy Using Capsule (Part 3)
  • Establishing a Highly Available Kubernetes Cluster on AWS With Kops
  • Automate Cluster Autoscaler in EKS
  • Creating an AWS EKS Cluster and Providing Access to Developer

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!