Fueling Curiosity, One Insight at a Time
At Codemancers, we believe every day is an opportunity to grow. This section is where our team shares bite-sized discoveries, technical breakthroughs and fascinating nuggets of wisdom we've stumbled upon in our work.
Apr 10, 2024
git switch -c branch_name
used in Git to create and switch to a new branch in one step.#gitcommand
soniya.rayabagi
Apr 10, 2024
The
#devops #helm #helmhub #kubernetes
helm search hub <keyword>
command is used to search for charts available in the Helm Hub, which is a centralized repository of Helm charts , keyword can be prometheus, grafana, nginx, postgresql etc.helm search hub <keyword> --max-col-width=0
this command displays the results without column width limitations.#devops #helm #helmhub #kubernetes
soniya.rayabagi
Apr 10, 2024
Empty a file using the
#UnixCommand
>
symbol. Simply typing > filename
truncates the file, removing all its previous content.#UnixCommand
soniya.rayabagi
Apr 10, 2024
chmod 777
is a command used to set permissions on a file or directory in Unix-like operating systems (including Linux and macOS). It grants full read, write, and execute permissions.#devops #FilePermissions
soniya.rayabagi
Apr 8, 2024
Kubernetes on Docker Desktop
• Install Docker Desktop
• Enable Kubernetes from docker-desktop setting
• Switch the Kubernetes context to docker-desktop
• Example :
• Instead of using the command
• To install kubectx on Mac:
#devops #kubernetes #dockerdesktop
• Install Docker Desktop
• Enable Kubernetes from docker-desktop setting
• Switch the Kubernetes context to docker-desktop
• Example :
❯ kubectl config get-contexts
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
docker-desktop docker-desktop docker-desktop
* kind-kube-nginx-cluster kind-kube-nginx-cluster kind-kube-nginx-cluster
❯ kubectl config use-context docker-desktop
Switched to context "docker-desktop".
• Instead of using the command
kubectl config use-context docker-desktop
we can also go with kubectx
to switch between Kubernetes context• To install kubectx on Mac:
brew install kubectx
#devops #kubernetes #dockerdesktop
soniya.rayabagi
Apr 8, 2024
Access Kubernetes dashboard on minikube
To access the dashboard:
This will enable the dashboard add-on, and open the proxy in the default web browser.
#devops #kubernetes
To access the dashboard:
minikube dashboard
This will enable the dashboard add-on, and open the proxy in the default web browser.
#devops #kubernetes
nisanth
Apr 5, 2024
Today I learnt , REST API endpoints for organization members
• It will List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned.
• The token must have the following permission set:
• Request example:
Response
#githubactionspublic #rest api
• It will List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned.
• The token must have the following permission set:
members:read
• Request example:
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer " \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/orgs/ORG/members
Response
[
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
}
]
#githubactionspublic #rest api
soniya.rayabagi
Apr 5, 2024
We can leverage the AWS Systems Manager service to execute the Ansible scripts on the EC2 hosts, this removes the overhead of maintaining SSH keys and other instance details.
How it is done:
• Prerequisites:
◦ EC2 instance should have an IAM role attached for SSM
◦ Ansible should be installed on the instance
• In the AWS System Manager go to State Manager and create a new association
• The association details will include: association name, Document, Ansible playbook, Target selection, schedule, and Rate control
• Based on the Association configuration, the playbook will be executed.
#automation #awsssm #ansible
How it is done:
• Prerequisites:
◦ EC2 instance should have an IAM role attached for SSM
◦ Ansible should be installed on the instance
• In the AWS System Manager go to State Manager and create a new association
• The association details will include: association name, Document, Ansible playbook, Target selection, schedule, and Rate control
• Based on the Association configuration, the playbook will be executed.
#automation #awsssm #ansible
Mahesh Bhosle
DevOps Engineer
Apr 3, 2024
Securing Sensitive Data in Kubernetes with Base64 Encoding
Today I learned that the
#devops #kubernetes #encoding
Today I learned that the
base64
command can be used in Kubernetes to encode sensitive data such as passwords and API keys when creating secrets. By encoding the sensitive information in base64 format, it can be safely stored in Kubernetes secrets without exposing it in plaintext. This adds an additional layer of security to the sensitive data used by applications running in Kubernetes clusters. echo -n "some_password" | base64
#devops #kubernetes #encoding
nisanth
Apr 3, 2024
while doing
to fix this just do
#sharp-error #npm #node
npm install
or yarn install
we might run into this error mentioned below:
error /Users//project/node_modules/sharp: Command failed.
Exit code: 127
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
to fix this just do
npm rebuild
& then run npm install
or yarn install
.#sharp-error #npm #node
satya
Showing 21 to 23 of 77 results
Ready to Build Something Amazing?
Codemancers can bring your vision to life and help you achieve your goals
- Address
2nd Floor, Zee Plaza,
No. 1678, 27th Main Rd,
Sector 2, HSR Layout,
Bengaluru, Karnataka 560102 - Contact
hello@codemancers.com
+91-9731601276